Comments (8)
Hey @dashukin,
Actually resolution of #19 was intended to fix any compatibility issues with third-party libraries (I had mainly jQuery in mind).
Can you show us any example in which you get an error/some unexpected behaviour?
Nevertheless I think that adding pointer to original function may be helpful in some uncommon situations, so why not?
I could put it under an _original
attribute of function created in prepareSafeListener
, so it would be accessible under .addEventListener._original
.
@zzarcon what do you think?
from default-passive-events.
Hey, @FRSgit
thank you for quick reply! Unfortunatelly I still canot reproduce the issue I'm facing with in a separate sandbox, but will try to dive into the details more deeply. In general I can see that chrome mobile emulator fires some handlers with click events, with preventDefault method set to noop function, while on real devices everything works fine... I will let you know when any new details are received so we could analyze if this a setup issue or something that could be handled from your library.
from default-passive-events.
Okay, so if you can try to come up with some reproducing-scenario it would be perfect for me.
But if it won't be so simple then please give me more info about you environment & codebase you use when getting this errors.
As I understand that problem can be connected with sandbox in which you run your app, but I cannot be 100% sure until I see your configuration.
We are in the same timezone (or almost-same) I guess, so you can always try to show me your problem via some screensharing app (like hangouts or sth).
from default-passive-events.
Since we needed to revert back fix that was made for #19 (details in #23) this issue is gone in 1.0.8.
@dashukin can you please check on your end if everything's okay?
from default-passive-events.
Hi @FRSgit. The element.addEventListener._original function just worked fine for me as a workaround for the issue with d3-drag that I had here: d3/d3-drag#51
Just FYI, so you know it was actually useful for someone :)
from default-passive-events.
Also, there was no interest in fixing the issue in d3 upstream: d3/d3-drag#52
from default-passive-events.
Well, I completely understand that they doesn't want any non-standard functionalities in their code.
For now, the only thing you can (and should) do when using default-passive-events
library is to bring back _original
listener before initializing d3-drag
.
Of course we could support some parameter which you would put on a element to flag that it should be ignored by our library, but I'm not sure if that's not an overkill. We want to keep library as simple & fast as possible.
from default-passive-events.
Okay, closing this now as _original
function was implemented correctly and is already included in README page. Hopefully more of you will be happy to use it 😃
from default-passive-events.
Related Issues (20)
- Unable to preventDefault inside passive event listener invocation. HOT 2
- 404 page demo.html HOT 5
- The routine doesn't work for YouTube videos embedded in iFrames HOT 8
- Error in console - Cannot read property 'capture' of null HOT 9
- Broken `removeEventListener` HOT 1
- Doesn't work, even the example page HOT 4
- Question: add new types of events HOT 5
- Cursor event not work while jquery is appending new content. HOT 2
- Desactivate passive mode for specific contents or specific elements. HOT 8
- this is not an issue as it seems HOT 2
- Issue with Select2 plugin HOT 3
- Question: where should I place the script to get the best result HOT 1
- About scroll event HOT 1
- Integration with Smooth Scroll e.g Locomotive Scroll HOT 2
- Remove sourceMappingURL from dist HOT 3
- Ability to provide/limit list of events
- CDN link 404 error HOT 1
- Unable to preventDefault inside passive event listener HOT 1
- Planned removal of crucial DOM events HOT 3
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 default-passive-events.