Skip to content
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

Feature: pointer-events: duplicate-event; for a href anchor #11448

Open
wesleyolis opened this issue Jan 6, 2025 · 0 comments
Open

Feature: pointer-events: duplicate-event; for a href anchor #11448

wesleyolis opened this issue Jan 6, 2025 · 0 comments

Comments

@wesleyolis
Copy link

Proposal
I would like to propose that for a tag element with an anchor href specified, which doesn't cause a page to reload,
that one can cause the click pointer event on the element to not be swallowed, this would allow one to use a host of CSS tricks
in the future with anchors, were one could automatically close menu items, by having a hidden checkbox or radio box toggled in the background.

duplicate or duplicate-passthrough, the naming is not as important for now, but the concept.

The following would cause the point click event to not be followed by the element and be duplicated and propagated to non-javascript CSS elements for processing still. In which case it would cause the checkbox to be toggled on/off in the background as well.
In the bigger picture the many other little tricks I am sure we shall find for it.

a.dup {
pointer-events: duplicate;     
}
label input {
position:absolute;
opacity: 0;  
height: 0;
width: 0;   
}

#opt :checked ~ menu {
display:block
}
<label>
Show Menu
<input id='opt' type="checkbox">
<div id="menu">
<a href="#anchor1">some jump link</a>
</div>
</lable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant