[Wayland] window.open top/left options aren't respected when generating a popup with explicit author-requested screen position
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
|
336 bytes,
text/html
|
Details |
STR:
- Load the attached testcase.
- Click the button in the testcase.
EXPECTED RESULTS:
A popup should appear that's left-aligned on your screen, 300px from the top of your screen (in whatever pixel coordinate space that window.open uses).
ACTUAL RESULTS:
The popup appears at some other position; sometimes snapped to top-left, sometimes at another position on-screen.
I think this is Wayland-specific. I'm not sure if we have any workaround for this, but I wanted to be sure we have a bug open to note the limitation and to have a handy place to post testcases. (Apologies if this is already tracked as a known-issue somewhere.)
| Reporter | ||
Comment 1•2 years ago
|
||
(reuploading the testcase; my previous testcase used a data-URI and apparently that makes the popup auto-close in Firefox, which is interesting but unrelated.)
| Reporter | ||
Comment 2•2 years ago
|
||
(This came across my radar when I was poking at testcases related to https://github.com/w3c/csswg-drafts/issues/7693 , BTW.)
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #1)
my previous testcase used a data-URI and apparently that makes the popup auto-close in Firefox, which is interesting but unrelated
I filed bug 1872953 on this^ behavior FWIW.
Comment 4•2 years ago
|
||
bug 1870955: Wayland apps can't position their windows, it's a core security feature of Wayland.
IIUC, one can only spawn child windows (context menu, website info, bookmark menu, main menu) in relation to the main window (which has a taskbar icon).
Personally I have set browser.link.open_newwindow.restriction to 0 (bug 103843, bug 803675, bug 55696, bug 269942, bug 565621, bug 1740063, bug 1714939, bug 1369328, bug 565541). Please consider setting it by default to 0 at least for MOZ_WIDGET_GTK or for Wayland.
Comment 5•2 years ago
|
||
We can position popup but only relatively to its parent window. If a popup is missing parent it's a toplevel window from Wayland POV and it can't be placed by application.
Comment 6•2 years ago
|
||
Let's track this in bug 1870955.
(In reply to Darkspirit from comment #4)
Personally I have set
browser.link.open_newwindow.restrictionto0(bug 103843, bug 803675, bug 55696, bug 269942, bug 565621, bug 1740063, bug 1714939, bug 1369328, bug 565541). Please consider setting it by default to 0 at least for MOZ_WIDGET_GTK or for Wayland.
I don't quite agree with this fwiw. This breaks a lot of legit popups (like e.g., PayPal / log in popups) that would be jarring to do in a separate tab / you'd lose a bunch of context.
Most popups don't specify a window position anyways afaict, because it's not super-reliable even on platforms where it actually works.
Updated•7 months ago
|
Description
•