Overview

Currently, the scrollbar visibility toggles on and off when the contextual menu is opened or closed. This behavior causes a shift in the layout, which may negatively affect the user experience.

Contextual menu issue

Proposed resolution

Figure out where this extra outer scrollbar has come from and remove it!

User interface changes

Fix.

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

omkar-pd created an issue. See original summary.

omkar-pd’s picture

Title: Fix the scrollbar issue when opening the contextual menu » Scrollbar visibility issue on opening and closing the contextual menu.
Issue summary: View changes
shyam_bhatt’s picture

Assigned: Unassigned » shyam_bhatt

shyam_bhatt’s picture

Assigned: shyam_bhatt » Unassigned
Status: Active » Needs review
omkar-pd’s picture

StatusFileSize
new593.66 KB

Testest the changes. If we move the cursor away a bit from the menu the menu closes.

contextual menu

omkar-pd’s picture

Status: Needs review » Needs work
shyam_bhatt’s picture

Assigned: Unassigned » shyam_bhatt
jessebaker’s picture

@omkar-pd I don't think that scrollbar on the right should be there at all! Is the screenshot taken on Windows?

omkar-pd’s picture

@jessebaker No, I'm using Ubuntu.

jessebaker’s picture

Issue summary: View changes
StatusFileSize
new452.14 KB

Updated the Proposed resolution in the issue summary.

shyam_bhatt’s picture

Assigned: shyam_bhatt » Unassigned
jessebaker’s picture

Assigned: Unassigned » bnjmnm
StatusFileSize
new785.54 KB

@shyam_bhatt You're code change does seem to resolve the issue, but I fear it is just treating a symptom and not addressing the cause.

This issue seems to have been introduced in https://www.drupal.org/project/experience_builder/issues/3454173

The addition of - system/base in experience_builder.libraries.yml means the /xb page is now loading extra JS libraries. One of which is announce.js. The code in announce.js add a new div to the page at the bottom of the body with a height/width of 1px that sits below the experience builder div and is what is causing the scrollbar.

Assigning to @bnjmnm to take a look.

jessebaker’s picture

Assigned: bnjmnm » jessebaker
Status: Needs work » Active

Discussed with @bnjmnm - the announce div is included as part of a longer term plan to improve a11y so it's correct that we are loading it on the page. For now I'm going to just set the body to have overflow: hidden and be done with it.

jessebaker’s picture

Thanks all. I've merged a fix. I also verified that (at least on MacOS) the fix does not prevent a11y screen readers from working with the announce.js functionality

jessebaker’s picture

Assigned: jessebaker » Unassigned
Status: Active » Fixed
omkar-pd’s picture

@jessebaker, I think you forgot to save credits. 😶

kristen pol’s picture

Crediting contributors.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.