Open Bug 1849812 Opened 1 year ago Updated 1 year ago

HTML dialogs in certain documents don't center properly when the window is dragged to a different resolution display

Categories

(Core :: Layout, defect)

Desktop
macOS
defect

Tracking

()

Tracking Status
firefox-esr102 --- unaffected
firefox-esr115 --- fix-optional
firefox116 --- wontfix
firefox117 --- fix-optional
firefox118 --- fix-optional

People

(Reporter: csasca, Unassigned)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Found in

  • Firefox 118.0a1

Affected versions

  • Firefox 117.0
  • Firefox 118.0a1

Tested platforms

  • Affected platforms: macOS 13.5
  • Unaffected platforms: Ubuntu 22.04, Windows 10

Preconditions

  • Two displays with different resolutions set (one with lower resolution and one higher)

Steps to reproduce

  1. Launch Firefox and access about:preferences
  2. At the General tab select Import Data
  3. Drag the Firefox window from the lower resolution screen to the higher one

Expected result

  • The Import Browser Data is fixed in the middle of the window

Actual result

  • The Import Browser Data is moved to the lower right corner of the window

Regression range

  • The regression was introduced in 111.0a1 between 2023-02-06 and 2023-02-07
  • Bug 1814912 - Use an HTML5 dialog instead of gSubDialog for the new migration wizard in about:preferences.

Additional notes

  • The issue can be seen in the following attachment
  • The issue is reproducible on Firefox View - History tab as well

Set release status flags based on info from the regressing bug 1814912

:mconley, since you are the author of the regressor, bug 1814912, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(mconley)

Hm. This might actually be an issue in the code that does HTML dialog layout, rather than in the migration code.

csasca, are you able to reproduce the issue if you go to this link: https://developer.mozilla.org/en-US/play?id=yIv5cG%2FANnPFRG37ZIvinQanVFXmTGyKNQJE8MzPPBHarsnIUfAYbDeh7%2BLawrFdDmY5pKpyUCudcP%2B%2F

and click on "Show the dialog", and then repeating your steps?

Flags: needinfo?(mconley) → needinfo?(csasca)

Hey Mike, just looked over and I can't reproduce the issue with the provided link on Firefox 118.0b2 nor 119.0a1 (2023-08-29). But the initial steps with the import dialog is still easily reproducible on both builds.

Flags: needinfo?(csasca)

Okay, interesting. It seems that the root document either needs to be an XHTML document... or it needs to be running in the parent process for this to manifest.

STR:

  1. Be on a computer plugged into a secondary display with a different resolution
  2. Visit about:robots
  3. Open the DevTools console, and paste this in:
let d = document.createElement("dialog");
let h1 = document.createElement("h1");
h1.textContent = "Move me between displays now.";
d.appendChild(h1);
document.body.appendChild(d);
d.showModal();
  1. Move the browser window between displays

ER:

The dialog should stay centered, regardless of which display it is on.

AR:

The dialog seems to move around when its window is moved to a lower density display.

Component: Migration → Layout
Product: Firefox → Core
Summary: [macOS] Import Browser Data prompt gets moved when Firefox window is dragged to a different resolution display → HTML dialogs in certain documents don't center properly when the window is dragged to a different resolution display
Severity: S4 → S3

I can reproduce an issue here when changing screen density on a single display, FWIW (no need for multiple displays).

My STR, on Ubuntu 22.04 Linux with Firefox Nightly 120.0a1 (2023-09-25) (64-bit) with a fresh profile:

  1. In system Settings app, Displays section, change "Scale" to 200%
  2. Launch Firefox and follow comment 4 steps 1 and 2 (launch a modal on about:robots)
  3. In system Settings app, now change Scale to 100%.

ER: Dialog should stay centered.
AR: Dialog is pushed off the bottom right corner of the window.

Notably: if you resize the content-area (e.g. by resizing the window, or pressing "alt" to make the menubar appear, or doing Ctrl+F to make the findbar appear), that prompts us to re-center the dialog, and the issue goes away.

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

Attachment

General

Created:
Updated:
Size: