-
Notifications
You must be signed in to change notification settings - Fork 52
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
Propose the new navbeforefocus UIEvent #246
Comments
focusin/focusout behave the way they behave just because how they got implemented at some point in one browser engine and then others had to follow that. They aren't particularly useful events atm. They would have been, had they been implemented the way the spec defined them at least at some point (the idea was that they'd be cancellable etc.) . |
I've noticed many requirements on the cancellable focusin/focusout events from JS developers, but it hasn't been supported yet. I guess there are some reasons in terms of browser engine implementation. I would like to propose a couple of expected issues on it as follows: 1. How to do rollback once focusin event is canceled. (preventDefault)
2. What's the difference between preventDefault in B.focusin and focus() in A.focusout Could someone explain any opinion on them above or provide a real use case that needs the cancellable focusin/focusout? For example, if we specify event.preventDefault() in A.focusout and B.focusin handler, what should it happen? |
I highly doubt we can change focusin/out implementations too much. They have been shipping for years now. IE used to have reasonable focusin/out behavior, but Edge (had to?) did switch to a model following what was shipping in Chrome/Safari, or at least quite similar model. And Firefox also had to follow what was shipping in Chrome. |
I agree on that. I thought the current focusin/out events seem to have coverage in which most of the requirements of the new proposed event (navbeforefocus) are supported except for the cancellable option. I just wonder the common use cases on the cancellable focusin/out events from JS developers point of views. (@dmethvin, @timmywil) |
CSS Spatial Navigation specification has been developed in CSS WG. One of the proposed APIs is NavigationEvent as a new interface with two event types(navbeforefocus, navnotarget).
https://drafts.csswg.org/css-nav-1/#events-navigationevent
Under reviews on how to implement them, I just wondered why focusin/focusout hadn't been defined as a cancellable. I found a related discussion on it at #88, but I couldn't see the reason at the thread.
Could someone explain the background or reason?
Any question or concern on the proposed navbeforefocus event is welcomed as well.
@dtapuska, @smaug----, @markelog
The text was updated successfully, but these errors were encountered: