Git Product home page Git Product logo

Comments (16)

drcmda avatar drcmda commented on September 27, 2024 1

Meanwhile i'm hosting it on the react-spring org with most of the ongoing PR's merged: https://github.com/react-spring/pointer-events-polyfill

I can remove it as well as the npm package if requested, just needed a solution real quick. And it's indeed working.

from pep.

patrickhlauke avatar patrickhlauke commented on September 27, 2024 1

@drcmda agree with turning things off. i personally just don't know how (i'm really outside of my comfort zone with automation things, npm, etc). so, happy for you to do the necessary (or direct me to what needs to be done), as i still think this has some marginal value for projects that want to run things with PE right now, or that need to support (for whatever reason) older environments.

from pep.

SpencerLynn avatar SpencerLynn commented on September 27, 2024

@philipp-spiess Did you see this working in another library? And if so, which library was it?

from pep.

philipp-spiess avatar philipp-spiess commented on September 27, 2024

@SpencerLynn I did not try other libraries but the problem can easily be reproduced in a JSFiddle: https://jsfiddle.net/odkrzgr6/1/

Every browser that natively supports pointer events that I've tested (Chrome, IE11, Edge, Firefox) will emit the gotpointercapture event to both the document and the target element.

However, when trying the example on Safari (where PEP kicks in) gotpointercapture will only be triggered at the target element since it does not bubble.

from pep.

SpencerLynn avatar SpencerLynn commented on September 27, 2024

Thanks! @philipp-spiess

from pep.

drcmda avatar drcmda commented on September 27, 2024

@philipp-spiess @SpencerLynn gotpointercapture seems to never fire (in Safari for instance), not on the target or anywhere else. Is this a known regression?

For instance in this example the green thing is supposed to go blue once it gets the capture: https://codesandbox.io/s/o70qjn9295

The capture itself seems to work, but the event is missing.

from pep.

philipp-spiess avatar philipp-spiess commented on September 27, 2024

@drcmda If I modify your example to listen directly on the node (using element.addEventListener()) the event seem to be fired: https://codesandbox.io/s/olyw3j6qv5

This is exactly the issue that #366 would fix: React will listen for events on the document so it expects this event to bubble which is not happening on Safari with this polyfill unfortunately.

from pep.

drcmda avatar drcmda commented on September 27, 2024

@philipp-spiess according to this comment #376 (comment) the PEP repo isn't maintained any longer? Would the react-dom team perhaps host it? It would be huge if we could simply support pointerevents instead of jumping through hoops for touch/mouse. For React and everything else.

Personally i'm getting stuck with a reconciler i am working on which relies on the gotcapture events (https://github.com/drcmda/react-three-fiber/blob/2.0/src/canvas.js#L252-L270). The hacks to get around this are pretty frightening.

from pep.

scottgonzalez avatar scottgonzalez commented on September 27, 2024

@drcmda I can give you admin access to this repo and make you an owner of the npm package if you're interested. Then you can just maintain this repo instead of the fork.

from pep.

drcmda avatar drcmda commented on September 27, 2024

@scottgonzalez i would love to but i don't think i can bear the responsibility. I am so swamped with work i wouldn't be able to maintain another repo. I just needed this PR so at least React can capture until Safari merges PE, which i hear will be very soon. But if you give me access to this repo, of course i could merge all the PR's real quick and to hell with tests and CI. But i think for this kind of thing - maybe a fork is safer, all bets are off at least. But as you like ...

from pep.

scottgonzalez avatar scottgonzalez commented on September 27, 2024

@drcmda I've given you admin access. Feel free to do as much or as little work as you'd like. You're also free to change/remove as much of the infrastructure around this project as you'd like.

from pep.

drcmda avatar drcmda commented on September 27, 2024

@scottgonzalez could you give me npm push access? I have merged the PR's, added a section on the readme explaining how to use the module - and it's good to go.

from pep.

patrickhlauke avatar patrickhlauke commented on September 27, 2024

@drcmda btw happy to help out if i can with any spec-related things and/or mild bits of scripting...it's just that the whole infrastructure around the tests and npm etc stumped me completely...so i'm glad to see this being taken up/care of.

from pep.

drcmda avatar drcmda commented on September 27, 2024

@patrickhlauke i would switch them off for a patch release, so we can at least use PE in our environments and perhaps jquery wants to come back to it later to fix infrastructure. But i think there's no point in letting all these bugfixes hang. I heard yesterday that PE are already unlocked in Safaris tech preview, so just a little longer and we are safe, meanwhile this project works good enough with all the bugfixes applied.

from pep.

drcmda avatar drcmda commented on September 27, 2024

I can handle the npm publish, no problem. If someone could ping me here once i have npm access i will get right to it.

from pep.

scottgonzalez avatar scottgonzalez commented on September 27, 2024

@drcmda You're now an owner of the npm package.

from pep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.