Closed Bug 1711710 Opened 5 years ago Closed 5 years ago

Javascript focus on existing popup not working if popup lock is set on

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

Firefox 88
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox88 --- wontfix
firefox89 --- fixed

People

(Reporter: giacomo.quinti, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

Steps to reproduce:

in my page I have a link used to open a popup using window.open:
popup = window.open(...);

on other link (dinamically created) I have the instructions to set focus in case the window is disappeared back others windows:
popup.focus();

Actual results:

until some month ago all was working perfectly, and on chrome and other browser is still working perfectly.
in firefox now, if the popup lock setting is ON (as always, in other browser also), the popup.focus() is not working... if I set OFF the popup lock setting in preference then all is working again perfectly.

I use this operativity to disable the opener window when I open a popup enabling the show of a gray layer, in this way the user understand the main form is disabled cause a popup opened. but if the popup is disappeared under other window on the screen with a simple clic on the main form the popup can reappear on the front...

Expected results:

On other browsers the lock is not working preventing focus on existing popup created, the absurd (in my opinion) is that the lock setting is disabling the possibility to focus the popup but not the ability to open (create) it...

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

GQ: Could you attach a testcase to this bug or let us know the link reproducing this bug?

Flags: needinfo?(giacomo.quinti)
Attached file page.htm

this is the main page, from this page the popup is opened. when the popup is on the screen, in chrome and opera and others browser clicking on the main page shadow the popup will be focused (also if the popup lock is enabled)... but not in firefox.

Flags: needinfo?(giacomo.quinti)
Attached file popuppage.htm

this is the second file, just a blank page in the popup...

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900)(Away: 4/29-5/5) from comment #2)

GQ: Could you attach a testcase to this bug or let us know the link reproducing this bug?

hi, I attached two simple files to reproduce the missing focus on the popup... you can try it with chrome (working ok) and then with firefox (focus missing).

thanks.
gq

Thank you for the testcase. It's not reproducible in the Nightly builds, but I reproduced it in Firefox 88. So, I tried to check the fixed point with mozregression. Then, I reached bug 1703472. So, this will be fixed in 89.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Depends on: 1703472
Resolution: --- → FIXED

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900)(Away: 4/29-5/5) from comment #6)

Thank you for the testcase. It's not reproducible in the Nightly builds, but I reproduced it in Firefox 88. So, I tried to check the fixed point with mozregression. Then, I reached bug 1703472. So, this will be fixed in 89.

perfect! I will wait for the 89 version.
thank you.
GQ

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: