Comments (10)
Just to be safe:
(event.target || this._element).setPointerCapture(event.pointerId);
from pointer-tracker.
I think the fix will be to change:
this._element.setPointerCapture(event.pointerId);
To
event.target.setPointerCapture(event.pointerId);
Can you try that for me?
from pointer-tracker.
Interesting! I think I currently assume that you're preventing default if you're returning true from the start callback, but I realise this isn't enforced.
A reduced test case would certainly help!
from pointer-tracker.
I actually do return true
from the start callback. It's pretty much a copy of the PinchZoom custom element from Squoosh, but transformed into a React component.
Inside the pinchable element is an SVG (rendered by React) with rect
s with React click handlers on them. Maybe it's a problem with the click event not being propagated to the React root?
(By the way, I'm a big fan of HTTP 203. Keep up the amazing work!)
from pointer-tracker.
Are you calling preventDefault
too?
from pointer-tracker.
Yes, just like Squoosh.
from pointer-tracker.
If you're saying preventDefault()
shouldn't be there: I've tried to remove it and it doesn't make a difference. The clicks still aren't registered.
from pointer-tracker.
That works! Thank you so much. Should I open a PR?
from pointer-tracker.
Yes please!
from pointer-tracker.
How should I handle the case where event.target
is null
? I would throw an error.
from pointer-tracker.
Related Issues (9)
- Dragging element HOT 2
- Using the right mouse button can cause a never-ending pointer HOT 4
- Initial canvas scale not correct in the demo HOT 1
- Update types to accept SVGElement | HTMLElement in the constructor
- triggerPointerEnd method is useful as public method HOT 1
- Enable pen/stylus erasing events
- Firefox bug with SVG Elements and multiple pointers HOT 3
- CommonJS dist file exports nothing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pointer-tracker.