Skip to content

Wrong width calculated when init removes scrollbars. #181

Description

@RalphSleigh

Just figured this out as this is apparently still state of the art slideshow technology in Drupal 8.

Broadly speaking:

  1. Initial page includes a slideshow that has 100% page width and a vertical scrollbar.

  2. Cycle adjusts the position on slides, this causes a reduction in the container height and removes the vertical scrollbar as it all fits in the window.

  3. Reads the slides width and sets that explicitly on the elements as the larger width without the scrollbar.

  4. Sets the container size to the size of the largest slide. this re-triggers the vertical scrollbar.

  5. We now have a container and slides wider than the page, triggering a horizontal scrollbar.

To fix this, I have moved the calculations done in the reshape section to further up the function before any changes are made to the page. This fixes my case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions