Contextual menu is opening at the wrong position

RESOLVED FIXED in Firefox 67

Status

defect
P3
normal
RESOLVED FIXED
9 months ago
8 days ago

People

(Reporter: karlcow, Assigned: daisuke)

Tracking

(Blocks 2 bugs)

64 Branch
Firefox 67
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [dt-q])

Attachments

(1 attachment)

Reporter

Description

9 months ago
With Firefox Nightly 64 (but it has been happening for ages)

0. on macOS (with a macbook with click on tap)
1. Go to https://www.mozilla.org/en-US/
2. Make the window small enough around 500px (leave space on the left side)
3. Activate responsive design mode
4. ctrl tap anywhere in the RDM viewport
   The contextual menu is displayed
5. (WITHOUT closing the contextual menu) move your cursor on the left side of the browser window to resize the window toward the left
6. Resize the window (double the size for example)
   The contextual menu disappears. (that's normal)
7. Ctrl tap again on the same area you did before.

Actual:
The contextual menu is opening shifted on the right side.

Expected:
The contextual menu should open at the place which has been tapped. 


(The Website is irrelevant. I can reproduce anytime.)
Whiteboard: [dt-q]
Priority: -- → P3
Blocks: 1493094
Duplicate of this bug: 1494450
See Also: → 1417889, 1461796, 1404081
Duplicate of this bug: 1506193
Blocks: rdm-ux
Assignee

Updated

2 months ago
Assignee: nobody → dakatsuka
Status: NEW → ASSIGNED
Assignee

Comment 3

2 months ago

The position of remote browser was not updated by resizing the window and
changing the align of viewport etc, although will be updated when the window
moves, the frame reflows and so on.
Thus, in this patch, update the position of remote browser before showing
context menu so as to locates at proper position.
I investigated though, when reflow and moving happens, the position is updated
by TabParent::UpdateDimensions()[1]. This patch as well is taking an approach
which update the position explicitly by TabParent::UpdateDimensions() before
showing context menu.

[1] https://searchfox.org/mozilla-central/source/dom/ipc/TabParent.cpp#729

This smells similar to https://searchfox.org/mozilla-central/rev/aae527894a97ee3bbe0c2cfce9c67c59e8b8fcb9/browser/base/content/webext-panels.js#99-108
See the blame.
Also that js code is hacky, but I don't mind using same approach in devtools, but want to file a new bug to sort out the issue properly. Explicit update from JS shouldn't be needed.

Assignee

Comment 5

2 months ago

Ah, it looks like same issue. Yup, I will use requestUpdatePosition() at this moment though, will file a bug that the position of remote frame does not update automatically. Thank you so much!

Attachment #9050920 - Attachment description: Bug 1488991: Update remote browser position before showing context menu. r?Honza,r?pbro → Bug 1488991: Update remote browser position before showing context menu. r?smaug,r?pbro

Comment 6

2 months ago
Pushed by dakatsuka@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d33ee85f2d4
Update remote browser position before showing context menu. r=pbro,smaug
Assignee

Updated

2 months ago
See Also: → 1535515

Comment 7

2 months ago
bugherder
Status: ASSIGNED → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
QA Whiteboard: [qa-67b-p2]
Duplicate of this bug: 1461796
You need to log in before you can comment on or make changes to this bug.