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

Modal mouse wheel issues in Chrome on Windows/Linux #16297

Closed
NerdGGuy opened this issue Apr 15, 2015 · 19 comments
Closed

Modal mouse wheel issues in Chrome on Windows/Linux #16297

NerdGGuy opened this issue Apr 15, 2015 · 19 comments

Comments

@NerdGGuy
Copy link

A modal is loaded on window.onload with the windows height smaller then the modal content. Scroll bar exists but mouse wheel doesn't scroll when using Chromium Version 41.0.2272.76 Ubuntu 14.04 (64-bit). Also confirmed this issue exists on Chrome Version 42.0.2311.90 Windows. Mouse wheel seems to work in Firefox.

http://bl.ocks.org/NerdGGuy/raw/8531bc767704e148c55f/

Re-sizing the window restores mouse wheel functionality. Also weirdly if a close button exists on the modal (not in this case sorry) mousedown on the button then mouseup away from button also restores mouse wheel functionality.

@sqal
Copy link
Contributor

sqal commented Apr 15, 2015

Works just fine on latest version of Firefox/Internet Explorer. It seems like this problem affects Chrome and Opera (28.0 - doesn't work either) and only if we open the modal with fade effect

// Edit:

Adding the following code fixes the issue for me:

.modal.fade.in {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

@cvrebert
Copy link
Collaborator

Reposting the underlying Gist to trigger LMVTFY: https://gist.github.com/NerdGGuy/8531bc767704e148c55f/

@twbs-lmvtfy
Copy link

Hi @cvrebert!

You appear to have posted a live example (https://gist.github.com/NerdGGuy/8531bc767704e148c55f), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 1, column 1 thru line 1, column 6: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@cvrebert
Copy link
Collaborator

JS Bin of your example, with the missing DOCTYPE added:
http://jsbin.com/nosuyi/2/edit

@cvrebert
Copy link
Collaborator

I am unable to reproduce on OS X Chrome 42.

@sqal
Copy link
Contributor

sqal commented Apr 15, 2015

@cvrebert Did you check this locally? Download your jsbin example and try it then, because I cant't reproduce this bug on jsfiddle/jsbin etc. sites.

@NerdGGuy
Copy link
Author

@cvrebert Sorry I should have mentioned I couldn't reproduce this bug on jsfiddle/jsbin which is why I used bl.ocks.org.

@sqal Thanks, I didn't think to check the fade effect.

// EDIT: Added DOCTYPE to gist/blocks just coz.

@cvrebert
Copy link
Collaborator

Still can't repro on OS X Chrome with the updated bl.ocks example. Maybe the bug is OS-specific.

@cvrebert
Copy link
Collaborator

Seems reproducible in Win 8.1 Chrome 42.0.2311.82 on Sauce Labs.

@cvrebert cvrebert changed the title Modal mouse wheel issues on Chrome Modal mouse wheel issues in Chrome on Windows/Linux Apr 15, 2015
@cvrebert
Copy link
Collaborator

Interestingly, I couldn't reproduce this in Linux Chrome 42.0.2311.22 on Sauce Labs.

@6
Copy link

6 commented Apr 22, 2015

I could reproduce this on OS X Chrome 41.0.2272.76 using Sauce Labs with the above bl.ocks URL.

This appears to be a related Chrome bug:
https://code.google.com/p/chromium/issues/detail?id=343244

Per @sqal's suggestion, adding either transform: translateZ(0) or transform: translate3d(0,0,0) to .modal.fade.in fixes it on OS X (41.0.2272.76) & Windows 8.1 (41.0.2272.89) on Sauce Labs.

Example fix:
http://bl.ocks.org/6/raw/d9357b1432f2d5dc63a8/

@cvrebert
Copy link
Collaborator

I guess the translateZ hack could be an option if we're okay with not supporting Safari<7.1 (on account of #14254), which would comply with our browser support policy.

@cvrebert
Copy link
Collaborator

Given the browser bugs we've seen associated with translateZ in the past, I think we're reluctant to try adding it to modals again (albeit in a different place).
@mdo WDYT? CantFix/WontFix?

@mdo
Copy link
Member

mdo commented Jun 23, 2015

Won't fix.

@cvrebert cvrebert added this to the v3.3.6 milestone Jun 23, 2015
@cvrebert
Copy link
Collaborator

Cool, I'll file another Chrome bug for good measure.

@benwo
Copy link

benwo commented Oct 5, 2015

Hey @cvrebert, any follow up? Am still having this issue.

@cvrebert cvrebert removed this from the v3.3.6 milestone Nov 11, 2015
@cvrebert cvrebert added the v3 label Nov 11, 2015
@cvrebert
Copy link
Collaborator

cvrebert commented Dec 7, 2015

Sorry, didn't get around to filing that Chrome bug. Reopening to keep it on my TODO list.

@cvrebert cvrebert reopened this Dec 7, 2015
@cvrebert cvrebert self-assigned this Dec 7, 2015
@cvrebert cvrebert removed their assignment Jan 19, 2016
@cvrebert
Copy link
Collaborator

I can no longer reproduce this with Chrome 47 on Win 10, Win 8.1, or Linux, on Sauce Labs, using the original bl.ocks example.

@cscuser
Copy link

cscuser commented May 6, 2021

Works just fine on latest version of Firefox/Internet Explorer. It seems like this problem affects Chrome and Opera (28.0 - doesn't work either) and only if we open the modal with fade effect

// Edit:

Adding the following code fixes the issue for me:

.modal.fade.in {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

woow its working..

@twbs twbs locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants