-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Dragging the scroll bar to scroll does not work. #139
Comments
Hello, The rule Lines 248 to 262 in 4e4237a
This is only the case when I think you can use an @supports (backdrop-filter: blur(12px)) {
.tingle-modal:before {
position: absolute;
}
} |
Hi @emmanuelballery, thank you! This solves the issue in both Windows Chrome and Windows Edge. Do you have any insights into how this might be addressed in the Mac browsers? I tried your fix there without success. I tried disabling the ::before backdrop completely. Still no love. I suspect the issue may have to do with the click event being picked up by Tingle. |
Hello, This is the list of browsers I worked with :
I tried to hack the scrollbar using this StackOverflow answer : https://stackoverflow.com/a/7855592 .tingle-modal::-webkit-scrollbar {
-webkit-appearance: none;
}
.tingle-modal::-webkit-scrollbar:vertical {
width: 10px;
}
.tingle-modal::-webkit-scrollbar-thumb {
border: 2px solid white;
background-color: black;
}
.tingle-modal::-webkit-scrollbar-track {
background-color: #ffffff;
} It works. It is usable. But, what a hack ... I don't think I can do more. A new DOM node to handle this |
It's a tricky one... We should be able to calculate scrollbar width then adapt event listener to handle click on scrollbar by using this: var scrollbarWidth = this.modal.offsetWidth - this.modal.clientWidth But on MacOS, depending on the setting shown by @emmanuelballery, the browser won't return the correct size when the scrollbar is set to "When scrolling" or when using Safari. We could use this data as a workaround but I find it a bit hacky: https://codepen.io/sambible/post/browser-scrollbar-widths To be honest, I don't understand why scrollbar trigger click event. It should be a different DOM elem or trigger a different event... Edit: another ressource |
Hi @robinparisi, The real problem is this rule This issue started here 21e333c. The blur effect is fine when using the
|
A solution could be to add a parent to .tingle-modal-backdrop {
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
backdrop-filter: blur(18px);
& > .tingle-modal {
position: relative;
height: 100%;
overflow-y: auto;
// remove top, right, bottom, left, z-index rules
}
} |
@emmanuelballery Maybe I'm missing something but I think we're talking about two different problems. With the following setting:
So even without the pseudo element, scrollbar trigger an event but it shouldn't. In fact, this seems logic because in theory, pseudo-element aren't part of the DOM and we can't attach events to them. With this setting instead:
macOS version: 10.14.6 |
If I resume, we have 3 bugs:
|
Man, I always forget about I think there are only 2 bugs. One you just fixed with # nothing wrong, do not support "backdrop-filter"
# Linux > Chrome 73.0.3683.86
# Linux > Firefox 75.0
# Windows (VM) > Firefox 75.0
# Windows (VM) > IE 11.615.17763.0
# Mac (VM) > Firefox 75.0
+ support "backdrop-filter" but fixed with "pointer-events: none"
+ Windows (VM) > Chrome 81.0.4044.113
+ Windows (VM) > Opera 67.0.3575.137
+ Mac (VM) > Chrome 81.0.4044.113
! support "backdrop-filter" but the scrollbar is blurry even with "pointer-events: none"
! Windows (VM) > Edge 44.17763.1.0
- no scrollbar at all, even with general settings set to "always show"
- Mac (VM) > Safari 11.0 |
If I assume the following:
I use trackpad and start scrolling, scrollbar then appears, I try to click on scrollbar to scroll by dragging it -> trigger event and close the modal If @spivurno can confirm because the only diff I see with @emmanuelballery is that I use a native version and not a VM (and maybe our OS version are not the same, the auto scrollbar is typically an OS dependent behavior). |
I can confirm that the With the same fix in place, I am still seeing the issue on Mac browsers. Starting to scroll reveals the scrollbar and then clicking the scrollbar closes the modal (rather than allowing you to drag it). If you update the macOS Show scrollbar setting to "Always", the |
Ok for me this is a problem on how macOS inject the automatic scrollbar into the DOM. I have some ideas on how to try to correct this but it is not ideal since we can't detect properly scrollbar mode, usage mode (touch, mouse, trackpad) and browser. I will think a little more and I will implement what seems the less "hacky". |
It should be good with the lastest release (v0.15.3) |
Seems like you had a great night! Thanks! |
@robinparisi Thank you so much! Implemented and tested. Works great! Sent you a few coffees via Ko-fi. @emmanuelballery I'd love to buy you a cup a coffee. Any method for doing so? |
That's really nice of you @spivurno. Just reward @robinparisi! He was the one who did all the work. I also had an interest in fixing this issue for my clients! |
Summary
Clicking and dragging the scrollbar to scroll through a modal that is taller than the viewport does not work. Interestingly, scrolling via a scroll wheel or trackpad does work.
Steps to Recreate
Mac | Firefox: Clicking the scrollbar closes the modal.
Mac | Chrome: Clicking the scrollbar closes the modal.
Mac | Safari: Clicking the scrollbar closes the modal.
The following were tested with BrowserStack:
Windows | Firefox: Works!
Windows | Chrome: The scrollbar does not move.
Windows | Safari: Couldn't get the site to load...
Windows | IE11: Works!
Windows | Edge: The scrollbar does not move.
Eager to be helpful. I'd be happy to commission or provide some additional sponsorship for your attention to this issue. I really appreciate your time!
The text was updated successfully, but these errors were encountered: