-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Selection box cause an error #867
Comments
Bug is here. |
It comes from #828 . I'm ready to PR something like this: getBoxDimensions(event: AbstractDisplacementStateEvent): ClientRect {
let rel: Point;
if (event.event.touches) {
const touch = event.event.touches[0];
rel = this.engine.getRelativePoint(touch.clientX, touch.clientY);
} else {
rel = this.engine.getRelativePoint(event.event.clientX, event.event.clientY)
}
...
} So I'm suggesting to use second path by default instead of assuming that it is MouseEvent. Do you have better idea for fast fix @renato-bohler ? It looks like |
Hmm, it's weird that this same code works on my project... but well, it seems to me that your change will address that issue. |
Steps to reproduce:
Firefox:
Uncaught ReferenceError: TouchEvent is not defined
Chrome:
Uncaught TypeError: Cannot read properties of undefined (reading 'x')
Expected result:
Selection box is visible and select nodes.
The text was updated successfully, but these errors were encountered: