-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
SwipeableDrawer JS error when dragging it, [Intervention] canceling event #12094
Comments
@jlascoleassi Something is definitely off. Thanks for raising it. |
Alright, after some digging, I think that I have found a good trail. I went back to @RByers comment on oliviertassinari/react-swipeable-views#183 (comment). We can leverage the @jlascoleassi Do you want to work on it? The following diff in the Backdrop.js should be enough: root: {
zIndex: -1,
position: 'fixed',
right: 0,
bottom: 0,
top: 0,
left: 0,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
// Remove grey highlight
WebkitTapHighlightColor: 'transparent',
+ // Disable scroll capabilities.
+ touchAction: 'none',
}, |
@oliviertassinari I just created the pull request and believe I took the appropriate steps for contributing. If not, please let me know. Thank you very much! |
I still see this conole error on Chrome Device emulator for |
@9jaboy are you using the latest version of Material-UI? |
|
I am not seeing this error on 3.1.1
…On Mon, Sep 24, 2018 at 1:51 AM Pejman ***@***.***> wrote:
@3.1.0 same error here!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12094 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Aj69nxOVSHV5IgLx9ovhPtSJEb1rrj6Iks5ueHLNgaJpZM4VH1jz>
.
|
I can still see this in |
should I create another bug for this? |
@9jaboy if you can consistently reproduce the issue on different environment, yes please. |
@oliviertassinari quickly pull to the right |
Hi @oliviertassinari , I also encounter this error, and drawer is semi-open until touch/drag is released On my local machine, versions are:
on prod (http://territorymanager.tools)
Here is how it's used in prod |
Expected Behavior
I would expect to not see JS errors build up in the console
Current Behavior
When dragging the SwipeableDrawer, a JS error is continuously thrown in the console:
"[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."
Steps to Reproduce (for bugs)
Context
A lot of JS errors are thrown
Your Environment
Potential Solution
After searching a bit online, others who have had similar errors have suggested checking to see if the event is cancelable before trying to cancel it. I modified the local code to test this out and the solution seems to work without any side effects. This solution would be:
Around line 155, add the && to check if the event is cancelable before preventing default:
if (dx > dy && event.cancelable) {
event.preventDefault();
}
And around line 188, do the same here:
if (event.cancelable) {
event.preventDefault();
}
The text was updated successfully, but these errors were encountered: