Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] Dialog scrolling #43076

Open
C-Lodder opened this issue Mar 18, 2024 · 6 comments
Open

[5.1] Dialog scrolling #43076

C-Lodder opened this issue Mar 18, 2024 · 6 comments

Comments

@C-Lodder
Copy link
Member

Steps to reproduce the issue

In your administrator dashboard, click on the "Add module to your dashboard", which will open a dialog.
When the dialog is open, you are still able to scroll on the main page (behind the dialog).

Expected result

When the dialog is open, I'd expect scrolling to be disabled for the main page.

image

@Fedik
Copy link
Member

Fedik commented Mar 18, 2024

No. Does the dialog scrolls or moves when you scroll the page? No, then no point 😉

@C-Lodder
Copy link
Member Author

C-Lodder commented Mar 18, 2024

@Fedik No, but when scrolling has reached the bottom within the dialog, it starts scrolling the main page. This is because the main page is still scrollable.

Body scrolling is disabled when modals are opened, with all major frameworks. Native HTML dialogs don't do this by default because because they have poor usability and accessibility.

Please read through the comments here: https://github.com/whatwg/html/issues/7732.....specifically this one: whatwg/html#7732 (comment)

@Fedik
Copy link
Member

Fedik commented Mar 18, 2024

I do not see it as an issue, maybe minor.
Overal accesebility of native dialog much better than most of major freamworks modals (especialy with focus handling).

The APA WG supports this proposal; it would improve accessibility for people who are experiencing a range of vision and cognition barriers.

With jumpy page, it does not make the accessibility better isn't it?
I mean, when you do "overflow:hidden" on the page, then much more things can go wrong: position:sticky stops working, browser removes "scroll bar", in the result the page content jumps around.

One caveat I can think of with this idea is that if an author makes a dialog that is too large for the current viewport, then the underlying document will need to be able to scroll so as to allow someone to view all the content of the dialog.

From the linked post.

I would keep native browser behavior here.

@Fedik
Copy link
Member

Fedik commented Mar 18, 2024

hm, maybe if it would be possible to prevent scroll event on parent window, then it would be possible, to mitigate it somehow.

@Fedik Fedik added the UI/UX label Mar 19, 2024
@Hackwar Hackwar added the bug label Mar 24, 2024
@flashymittens
Copy link

overscroll-behavior: contain;?

@Ruud68
Copy link
Contributor

Ruud68 commented Apr 18, 2024

Just 'bumping' this one here. Been rewriting a lot of BS modals into the new dialogs. When you have a long page with a lot of links to dialogs, then this is actually a user interface 'issue'. When scrolling the dialog is at the bottom, the background automatically starts scrolling: when closing the dialog the user is 'lost' as that is not where he started / clicked the link to open the dialog: he needs to scroll back to find where he left off.

The old (and yes I am aware of the phrase that in the past everything was better :)) BS modals didn't have this background scrolling enabled: works IMO better / user friendlier.

just my 2cts.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43076.

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

No branches or pull requests

6 participants