Panel window type is not opening on given position.
Categories
(WebExtensions :: General, defect, P3)
Tracking
(firefox109 fixed)
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: edoubuntu, Assigned: yuki, NeedInfo)
References
(Regressed 1 open bug)
Details
(Whiteboard: triaged)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0 Build ID: 20160506004122 Steps to reproduce: Create a webextension which uses chrome.windows.create({ url: 'https://www.google.com', height: 330, width: 430, left: screen.width-430, top: screen.height-330, type: "panel" }); open it with "Load Temporary Add-on" on Firefox Developer Edition, and make the extension execute the command. Actual results: The panel appears in the middle of the screen, without considering the given dimensions. The panel should have ignored the specified dimensions IF the panel environment was implemented like in Chrome/Chromium ( always on top, panels auto sorting and specific 'minimize' function). Expected results: The panel should have followed the dimensions I've given and appeared on the bottom right corner.
I've uploaded the extension repo on github [0] [0]https://github.com/edoardoo/keepTube
Updated•8 years ago
|
Updated•8 years ago
|
Comment 3•8 years ago
|
||
Confirmed, I found the example had a few other issues so I made a simpler one (attached). Note that changing left and top works great by using window.update, so there's a valid workaround for developers until we can fix this.
Comment 4•8 years ago
|
||
Updated•8 years ago
|
Comment 7•8 years ago
|
||
It is specified in both the moz & chrome documentation that this is the behavior: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/windows/create https://developer.chrome.com/extensions/windows If you would like to place the window you must use a 'popup' type window, although there is a firefox bug where the left & top are ignored for the create window function. bug referenced: https://bugzilla.mozilla.org/show_bug.cgi?id=1296036
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Bulk move of bugs per https://bugzilla.mozilla.org/show_bug.cgi?id=1483958
Assignee | ||
Comment 10•4 years ago
|
||
Assignee | ||
Comment 11•4 years ago
|
||
After some research I've realized that the centerscreen
feature triggers this problem.
On Google Chrome windows.create()
accepts left
and top
for popup type windows, and omitted coordinates are filled with "(left
of the last normal window + 10, top
of the last normal window + 10)". So my patch does same thing on Firefox, except applying centerscreen
if both left
and top
are omitted.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 12•4 years ago
|
||
(In reply to Andy McKay from comment #3)
Note that changing left and top works great by using
window.update, so there's a valid workaround for developers until we can fix
this.
But this workaround means the window first appears in the middle of the screen and only then is moved to the wished position, making it a rather ugly hack. Or am I missing something?
Comment 13•4 years ago
|
||
Correct .. kind of annoying for users, who come and complain about it to me as add-on author .. but there's nothing I can do so far.
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/ad64957cf655 Place "popup" type window to given coordinates r=mixedpuppy
![]() |
||
Comment 15•4 years ago
|
||
If you want to get a patch landed, please go to the revision in Phabricator, click "Edit Revision" on the top right and add the "CheckinNeeded" tag. Thank you.
Assignee | ||
Comment 16•4 years ago
|
||
Oh thanks! I didn't know the workflow was changed.
Comment 17•4 years ago
|
||
Backed out for failures on browser_ext_windows_create_params.js
backout: https://hg.mozilla.org/integration/autoland/rev/7f8b25d9a7668670eebfec6df1a6d63ef7527c35
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=310138911&repo=autoland&lineNumber=24865
[task 2020-07-17T09:19:15.115Z] 09:19:15 INFO - TEST-PASS | browser/components/extensions/test/browser/browser_ext_windows_create_params.js | test result correct -
[task 2020-07-17T09:19:15.115Z] 09:19:15 INFO - Leaving test bound testWindowCreateParams
[task 2020-07-17T09:19:15.115Z] 09:19:15 INFO - Entering test bound testPopupTypeWithCoordinates
[task 2020-07-17T09:19:15.115Z] 09:19:15 INFO - Extension loaded
[task 2020-07-17T09:19:15.116Z] 09:19:15 INFO - Console message: Warning: attempting to write 42195 bytes to preference extensions.webextensions.uuids. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file. This preference will not be sent to any content processes.
[task 2020-07-17T09:19:15.116Z] 09:19:15 INFO - Buffered messages finished
[task 2020-07-17T09:19:15.117Z] 09:19:15 INFO - TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_windows_create_params.js | expected popup type windows are opened at given coordinates - Got 123,123 / 123,60 / 60,123 / 1450,1013 / 0,27, expected 123,123 / 123,60 / 60,123 / 1450,1050 / 0,27
[task 2020-07-17T09:19:15.117Z] 09:19:15 INFO - Stack trace:
[task 2020-07-17T09:19:15.117Z] 09:19:15 INFO - chrome://mochikit/content/browser-test.js:test_is:1327
[task 2020-07-17T09:19:15.117Z] 09:19:15 INFO - chrome://mochitests/content/browser/browser/components/extensions/test/browser/browser_ext_windows_create_params.js:testPopupTypeWithCoordinates:122
Comment 18•4 years ago
|
||
Assignee | ||
Comment 19•4 years ago
|
||
The test looked to be failed due to difference of screen.width/height and screen.availWidth/availHeight. The purpose of failed assertions is asserting that the window won't be placed out of the visible area. So I've separated assertions for the purpose and just compare whether the actual coordinates are inside of the visible area instead of exact same to the expected coordinates.
I've not tested this change on the tryserver because my Mercurial access is currently disabled from my too long suspend...
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Comment 20•2 years ago
|
||
There seems to be a new bug confusing virtual and physical pixels (at least my theory so far) when updating size and position with browser.windows.update().
Updating size and position still works correctly (or as it used to) on screens where physical and virtual pixel size are the same. But on high density screens, the behaviour has changed recently. Probably with release of Firefox 106(?).
I probably need to investigate a bit more before I officially file a bug. But looks like related to the scaling factor between logical and physical pixels.
Anyone else noticed new behaviours?
Tested on Win11 with a couple of PCs and screens. I will test a bit more on differently configured PCs the coming days (but probably still only Windows)...
Comment 21•2 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:yuki, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Assignee | ||
Comment 22•2 years ago
|
||
I've updated the patch based on the latest mozilla-central and it also includes some fixes from review comments.
Assignee | ||
Comment 23•2 years ago
|
||
Phabricator says as "This revision is now accepted and ready to land". Should I set "chckin-needed" without more review for updates?
Comment 24•2 years ago
|
||
FYI, the bug I talked about in comment 20 is (became) https://bugzilla.mozilla.org/show_bug.cgi?id=1798213
Maybe at first slightly offtopic for this bug. But on the other hand maybe a bit relevant to know if fix for 1798213 is also included when testing a fix for this bug(?)
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 25•2 years ago
|
||
I've tried setting the checkin-needed
to the keyword
field but the bugzilla said "Value is Not Active / The keyword value 'checkin-needed' is not active", so I added it to the whiteboard
field. I couldn't find out descriptions about the checkin-needed
keywoard at https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html and other documents on firefox-source-docs.mozilla.org. Is there any document for this case?
![]() |
||
Comment 26•2 years ago
|
||
Landing has been requested.
The checkin-needed
keyword got removed. Please request landing from the patch reviewer for future patch submissions, see https://firefox-source-docs.mozilla.org/contributing/how_to_submit_a_patch.html#pushing-the-change
Comment 27•2 years ago
|
||
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/424c4d51a7cd Place "popup" type window to given coordinates r=mixedpuppy
Comment 28•2 years ago
|
||
Backed out for causing mochitest failures on browser_ext_windows_size.js
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | browser/components/extensions/test/browser/browser_ext_windows_size.js | Expected 'left' value - Expected: -50, Actual: 0 -
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
![]() |
||
Updated•2 years ago
|
Comment 29•2 years ago
|
||
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/69deea558245 Place "popup" type window to given coordinates r=mixedpuppy
Comment 30•2 years ago
|
||
bugherder |
Description
•