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

Zooming no longer works as expected on Chrome 73+ #333

Closed
CarlousF opened this issue Mar 29, 2019 · 3 comments
Closed

Zooming no longer works as expected on Chrome 73+ #333

CarlousF opened this issue Mar 29, 2019 · 3 comments
Labels
Milestone

Comments

@CarlousF
Copy link

CarlousF commented Mar 29, 2019

As of Chrome 73, attempting to zoom in / out of the DiagramWidget causes the entire page to scroll at the same time as zooming in / out of the diagram, with the following error appearing in the developer console:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/6662647093133312

As the error suggests, this appears to be caused by the fact that onWheel events are now automatically treated as passive, requiring developers to set passive to false manually when defining the onWheel event.

@kmannislands
Copy link

Seems this is the issue described in facebook/react#6436 as well.

@riyadshauk
Copy link

I'm not disregarding the fact that this is still a problem and should be fixed in storm-react-diagrams.

However, this behavior can be fixed in your own codebase (in terms of functionality) by using your own ModifiedDiagramWidget, locally saved in your project, rather than { DiagramWidget } from storm-react-diagrams.

Just wrap the div returned in the render method, as suggested in the comment (from the issue @kmannislands referenced) here: facebook/react/issues/6436#issuecomment-477819667.

Then, another problem arises when working in development, using npm start. You will get an error which says: Error: "element" is read-only _readOnlyError node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/readOnlyError.js:2. To get around this error which causes the app to crash in development, simply comment out the line in the referenced file throw new Error("\"" + name + "\" is read-only"); (assuming you haven't ejected your react app and thus don't have access to a webpack or babel file to properly set the flags to disable strict mode in development).

In production, the error shouldn't occur, since it's a strict mode issue for help with debugging errors.

Thanks to @CarlousF and @kmannislands for pointing us users/developers in the right direction thus far!

@dylanvorster dylanvorster added this to the 5.3 milestone Jul 22, 2019
@dylanvorster
Copy link
Member

Fixed

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

No branches or pull requests

4 participants