Blur & Focus Event Not Firing After Using System Print Dialogue in Firefox on an Iframe
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
People
(Reporter: bugzilla, Assigned: edgar, NeedInfo)
References
(Regressed 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file, 1 external file)
|
2.26 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0
Steps to reproduce:
-
Create a Text Input Field on the Main Page: Add a text input field to a webpage. This field should have an associated blur and focus event handler that triggers a noticeable action (e.g., an alert or a console log).
-
Add an Iframe to the Same Page: Insert an iframe onto the same webpage.
-
Create a Print Button on the Main Page: Place a button on the main page, outside the iframe. This button should be linked to a function that triggers the print command for the iframe's content (e.g., window.frames['printTestIframe'].print()).
-
Interact with the Text Input: Focus on the text input field and then click away to trigger the focus and blur event. Observe that the blur and focus events function as expected.
-
Use the Print Button: Click the print button on the main page to invoke the print functionality for the content of the iframe.
-
Select 'Print Using System Dialogue': In Firefox's print dialogue, navigate to 'More Settings' and select 'Print using system dialogue'.
-
Complete or Cancel the Print Job: In the system print dialogue, either proceed with the print command or cancel the print job.
-
Attempt to Trigger the Blur and Focus Event Again: After closing the print dialogue, return to the text input on the main page. Focus on the input and then click away to test if the blur and focus events trigger.
-
Observe the Behavior: Notice that the blur and focus event no longer triggers after using the system print dialogue.
This bug does not seem to appear in other chromium based browsers or safari. All testing was performed on Mac OS 14 and 12 on two different chipsets Intel and Silicon.
Issue first appeared in version 119 and has persisted since.
(Example document implementing these steps attached)
Actual results:
Following the use of the system print dialogue to print iframe content, the blur and focus events on the main page's text input field stops functioning. This issue affects all open tabs in the session and persists until Firefox is restarted or a new window is created. On some occasions if you have a new window open before causing the bug you can remedy the effects of the bug if the second window has a text input focused already.
Expected results:
The blur and focus events should consistently trigger each time the text input is focused and loses focus, regardless of the previous interaction with the system print dialogue.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 1•2 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
What would be the recommended workaround? On Mac OS the Firefox Print UI does not allow custom page sizes that were created in the System Dialogue which is why using the system dialogue is required.
Comment 3•2 years ago
|
||
:derek if you're interested, you could try using the mozregression tool to find the regressor.
Updated•2 years ago
|
Comment 4•2 years ago
|
||
:sefeng any thoughts on https://bugzilla.mozilla.org/show_bug.cgi?id=1875416#c2?
Updated•2 years ago
|
Comment 5•2 years ago
|
||
What would be the recommended workaround? On Mac OS the Firefox Print UI does not allow custom page sizes that were created in the System Dialogue which is why using the system dialogue is required.
When I test this, switching to a different space and then switch back fixes this. Not sure if this counts as a workaround...
Edgar, this is an regression of bug 1846205, can you take a look?
:sefeng I had tested something similar to what you mentioned (below). This isn't an effective workaround with user based environments unfortunately since it can cause many extra steps to be taken to print once and then repeat.
On some occasions if you have a new window open before causing the bug you can remedy the effects of the bug if the second window has a text input focused already
(In reply to Sean Feng [:sefeng] from comment #5)
What would be the recommended workaround? On Mac OS the Firefox Print UI does not allow custom page sizes that were created in the System Dialogue which is why using the system dialogue is required.
When I test this, switching to a different space and then switch back fixes this. Not sure if this counts as a workaround...
Edgar, this is an regression of bug 1846205, can you take a look?
:diannaS Thank you for noting the regression tool here is my pushlog after testing. This looks to be a regression of Bug 1854368 on my end.
| Assignee | ||
Comment 8•2 years ago
|
||
I got the same regression window as comment 5.
98:25.85 INFO: Last good revision: 9bd4382dea77b6cd46c62b892546c72965f462fd
98:25.85 INFO: First bad revision: a9c4719acd72e8f79a9828f2ec2529be460e9f2b
98:25.85 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9bd4382dea77b6cd46c62b892546c72965f462fd&tochange=a9c4719acd72e8f79a9828f2ec2529be460e9f2b
I will take a look. Thanks for reporting this issue!
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 9•2 years ago
|
||
Comment 10•2 years ago
|
||
I can confirm that a workaround exists because focusing another app and coming back to it will have the events working again. Furthermore, I can also confirm the regressor previously provided (bug 1846205) and the fact that it appears to be MacOS specific. (tested in MacOS 11).
Comment 11•2 years ago
|
||
Can we please get an update on this? The issue occurs in both Windows and macOS operating systems. This is bug and has been verified with no further action being taken. I require Firefox to my clients for onsite printing and 4 months have gone by since Derek reported this issue. I don’t want to sway from Firefox but… Any update?
| Assignee | ||
Comment 12•2 years ago
|
||
(In reply to Kyle from comment #11)
The issue occurs in both Windows and macOS operating systems.
I did not see the same issue on Windows, could you elaborate more and file a new bug for Windows if you could consist reproduce the issue on Windows? Thanks!
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
| bugherder | ||
Updated•2 years ago
|
Comment 15•2 years ago
|
||
Hi Edgar, what are your thoughts on uplifting this to Beta for Fx128?
| Assignee | ||
Comment 16•2 years ago
|
||
The code changes here doesn't have good automation tests, I would prefer let it just ride the train, so we could have longer cycle to catch the possible regression.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 17•2 years ago
|
||
I've replicated this issue using Firefox 121.0 on macOS11 following the STR from Comment 0.
Verified as fixed in the latest Firefox 129.0b8 version on macOS 11, as the issue no longer occurs.
| Reporter | ||
Comment 18•2 years ago
|
||
Issue persists in versions 129 and Nightly 130 with the "System Print Dialogue"
I have tested the issue on the latest version 129 and the Nightly build 130 using the same test script I previously provided. The updates did not fully resolve the issue. One critical point is that the issue still occurs when the "System print dialogue" is used if the about:config setting print.prefer_system_dialog is set to true.
Steps to Recreate:
- Update Firefox to the newest version 129 or Nightly build 130.
- Set the
about:configsettingprint.prefer_system_dialogtotrue. - Attempt to print a document.
- In the system print dialogue, press the print button to complete the test.
Observed Behavior:
- The browser now completely freezes. Before, only the events wouldn't work; now nothing works.
This did introduce a new workaround however:
- Set
print.prefer_system_dialogtofalse. - When the Firefox native print dialogue opens, select "Print using system dialogue" in the advanced settings.
- This workaround allows the system print dialogue to function without the issue. However, it is clunky and not ideal.
Additional Notes:
- In most cases, the system dialogue may not be necessary if the Firefox native print dialogue allowed custom sizes on Mac OS.
| Assignee | ||
Comment 19•2 years ago
•
|
||
(In reply to Derek from comment #18)
Observed Behavior:
- The browser now completely freezes. Before, only the events wouldn't work; now nothing works.
It works well with setting print.prefer_system_dialog to true on last Nightly on my machine.
Do you still see this on your machine with last Nightly? If so, could you also try troubleshoot mode or create a new profile? Thanks!
Updated•1 year ago
|
Description
•