Problem/Motivation

Under given circumtances, Visual Debugger might trigger an horizontal scroll on the page when one of the elements within wrapper element .visual-debugger--base is wider than the screen size. A 1px difference might trigger the scrollbar. An element covering the entire screen might cause the scrollbar to be activated.

Steps to reproduce

Install Visual Debugger on a fresh Drupal 10 site with the Olivero theme. Element off_canvas_page_wrapper may cause the horizontal scrollbar to be displayed because of a 1px difference.

Proposed resolution

When calculating instance widths, use Math.floor (always rounds down and returns the largest integer less than or equal to a given number), instead of Math.round (might deliver an integer which is larger than the element itself, which could cause an element to be wider than the visible screen width).

Remaining tasks

Fix the code and replace the math rounding method.

User interface changes

Should stop the horizontal scrollbar from showing.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mabho created an issue. See original summary.

mabho’s picture

Status: Needs work » Fixed

The problem with horizontal scrolling has been fixed on this version.

  • mabho committed 4ab31b91 on 1.0.x
    Issue #3456248 by mabho: Fix an horizontal scrollbar being triggered by...
mabho’s picture

mabho’s picture

Status: Fixed » Closed (fixed)

The problem has been fixed and an horizontal scrollbar isn't showing anymore.

mabho’s picture