Closed Bug 1898733 Opened 4 months ago Closed 4 months ago

Moving the tab to a new window while the scan is ongoing will make the page unresponsive

Categories

(Firefox :: Data Loss Prevention, defect)

Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- verified
firefox126 --- unaffected
firefox127 --- unaffected
firefox128 --- wontfix
firefox129 --- verified

People

(Reporter: atrif, Assigned: gstoll)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached image dlp_0.gif

Found in

  • 128.0a1 (2024-05-23)

Affected versions

  • 128.0a1 (2024-05-23)

Tested platforms

  • Affected platforms: Windows 10x64, Windows 11
  • Unaffected platforms: Ubuntu 23, macOS

Preconditions

  • Download the DLP test assets from https://drive.google.com/file/d/1yjqVRuxdKV3WnO7D2wzMgDXBuYBxUgVw/view
  • Create a distribution folder inside the Firefox folder and paste the policies-1.json to it and then rename it to policies.json
  • run the DLP agent in CMD using: .\content_analysis_sdk_agent.exe --user --toblock=.\d{3}-?\d{2}-?\d{4}. --towarn=.warn. --delays=10

Steps to reproduce

  1. Copy some random text in the clipboard and open https://en.wikipedia.org/wiki/Main_Page.
  2. Paste the text and while the scan is ongoing choose to Move the tab in a new window.

Expected result

  • The scan message is displayed in the new window and the content of the page is responsive.

Actual result

  • The message disappears and no interaction can be made with the content of the page.

Regression range

  • Not a regression. New implementation.

Additional notes

  • Attached a screen recording.
  • This happens when drag and dropping the tab to a new window as well.
Assignee: nobody → gstoll
Status: NEW → ASSIGNED

The fact that the busy dialog doesn't show in the new window seems to be a common problem with MODAL_TYPE_TAB dialogs - I was able to reproduce it with the LoginManagerAuthPrompter by visiting a site that uses HTTP Basic authentication and moving that tab to a new window. In that case, it seems equivalent to clicking Cancel on the dialog; obviously the behavior is worse in the DLP case and we need to do something to fix this.

It looks like we may be able to detect this happening by listening to the "SwapDocShells" event.

Sigh, even if we fix up the dialogs the tab won't be able to be interacted with because of bug 1754759. So I'm thinking the best thing to do is try to cancel the request before the Swap happens and at least the page won't be stuck.

I don't think there's anything we can do about this. Even if we cancel the dialog when we get the SwapDocShells event, the page will still be stuck afterwards, and that's the earliest chance we know that the move to new window operation is happening. I'm going to mark this as blocked by bug 1754759.

Assignee: gstoll → nobody
Status: ASSIGNED → NEW
Depends on: 1754759

I have a fix for bug 1754759 and that should fix this issue without any further code changes.

Bug 1754759 is fixed now, so marking this fixed.

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED

Verified fixed with Firefox 129.0a1 (2024-06-16) on Windows 10x64 and Windows 11. After moving the tab to a new window while the scan is in progress the modal dialog is closed and the page no longer becomes unresponsive.
However, if I move the tab while the warning dialog is displayed the tab becomes blank. I filed bug 1902969 for that.

Status: RESOLVED → VERIFIED
See Also: → 1902969
Assignee: nobody → gstoll
Target Milestone: --- → 129 Branch

Verified as fixed on Firefox 128.3.0esr, build ID 20240911002735 (from Treeherder), using Windows 10/11.

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

Attachment

General

Created:
Updated:
Size: