kdasustainable.blogg.se

Firefox vs firefox focus
Firefox vs firefox focus













To summarise your question, the issue you face is: Really confused now as there are three distinct ways that various browsers handle exiting a confirm() dialog. If you confirm the box in Firefox (v55.0.2) you'll get a focus() event triggered on the initial box, and then the function will subsequently trigger a second focus() event on the target element (the next element).īy contrast, if you do the same thing in Chrome (v.101), you'll get two focus() events triggered on the next element - one from the function and one from presumably from the confirm dialog.Įdit: Tested this on Chrome v.112 and there is only one focus() event (the one explicitly triggered by my function) which is what I'd expect and things behaved when I first developed the app.

firefox vs firefox focus

I've put together and example below that illustrates what I mean. Why? At the very least, I need to find a way to make these events consistent across browsers. It seems that exiting a confirm box triggers a focus() event on close, but the behavior is different in Firefox than in Chrome.

firefox vs firefox focus

I have a complex web application that relies in part on the focus() event and I'm running into some difficulty when using a confirm() box inside a function.















Firefox vs firefox focus