ahume / flight-click-trap Goto Github PK
View Code? Open in Web Editor NEWListen for clicks inside and outside of a component node
License: MIT License
Listen for clicks inside and outside of a component node
License: MIT License
It'd be nice to see a version of this which can sit at the top level of the document and responds to events instead of having to create a new one for each modal.
If we specify a class name to apply to modals, e.g. .has-click-trap, this component can listen for clicks inside and outside of elements where that class has been applied, and then listen for click-trap-activation-request and click-trap-deactivation-request events (not sure about the event names, might need to think about that). This way the modal doesn't need to implement click trap itself and can fire events instead.
A similar piece could be done for an overlay which would then insert the overlay beneath the component that requested it. This would prevent the need for components to reach outside their dom subtree.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.