Skip to content

Close button misplaced when using long title #1703

@sammuell

Description

@sammuell

Description

When defining a long title which wraps onto multiple lines, the close button does not stay in the corner. Instead, it is shown below the title.
It seems to be a floating issue. A solution might be to use a flexbox instead of floating the title and close button.

Expected Behavior

The close button is expected to always stay in the top right corner.

Actual Behavior

grafik
grafik

Example (recommended)

Use the following code on this page: https://introjs.com/docs/examples/basic/json-config

introJs().setOptions({
  steps: [{
    title: 'Welcome Welcome Welcome Welcome Welcome Welcome Welcome',
    intro: 'Hello World! 👋'
  },
  {
    element: document.querySelector('.card-demo'),
    title: 'card-demo card-demo card-demo card-demo card-demo card-demo card-demo card-demo card-demo',
    intro: 'This step focuses on an image'
  },
  {
    title: 'Farewell Farewell Farewell Farewell Farewell Farewell Farewell Farewell!',
    element: document.querySelector('.card__image'),
    intro: 'And this is our final step!'
  }]
}).start();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions