Closed Bug 1300103 Opened 8 years ago Closed 8 years ago

Context menu is wrongly displayed if using the left click in the viewport while Touch simulation is enabled

Categories

(DevTools :: Responsive Design Mode, defect, P1)

51 Branch
defect

Tracking

(firefox48 unaffected, firefox49 unaffected, firefox50 unaffected, firefox51 disabled, firefox52 verified)

VERIFIED FIXED
Firefox 52
Iteration:
52.3 - Nov 14
Tracking Status
firefox48 --- unaffected
firefox49 --- unaffected
firefox50 --- unaffected
firefox51 --- disabled
firefox52 --- verified

People

(Reporter: mboldan, Assigned: jryans)

References

Details

(Whiteboard: [multiviewport] [reserve-rdm])

Attachments

(1 file)

[Affected versions]: - Firefox 51.0a1 (2016-09-02) [Affected platforms]: - Windows 10x64, Mac OS X 10.11.1, Ubuntu 16.04x64 [Steps to reproduce]: 1. Launch Firefox. 2. From about:config, enable the devtools.responsive.html.enabled pref. 3. Open RDM. 4. Enable Toggle tools. 5. Hold the left click pressed in the viewport. [Expected result]: - If the click is pressed while the cursor is over an element, that element is correctly selected and if is pressed while the cursor is not over any element from the page, nothing happens. [Actual result]: - The context menu is displayed. Here is a screencast of the issue: https://drive.google.com/open?id=0B-cUbHVNThEKQWpucHNKMVd4YWs [Regression range]: - This is a recent regression. Last good revision: 26e22af660e543ebb69930f082188b69ec756185 First bad revision: 987bda408af336b975d3d9108396356a8e0d28b3 Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=26e22af660e543ebb69930f082188b69ec756185&tochange=987bda408af336b975d3d9108396356a8e0d28b3 [Additional notes]: - Note that if the left click is used in the viewport in an area where is no element to be selected. the nearest element from the cursor is selected(from my point of view is not en expected result).
QA Whiteboard: [qe-rdm]
Flags: qe-verify+
Priority: -- → P3
Whiteboard: [multiviewport] [triage] → [multiviewport] [reserve-rdm]
I don't see this as a regression exactly, and also the feature is disabled for now. It's related to bug 1292133 which wires up contextmenu messages. The right-click case is improved (inspect element works), but this long tap left click issue now appears. To clarify the STR, you need to enable touch simulation like the summary says: 1. Launch Firefox. 2. From about:config, enable the devtools.responsive.html.enabled pref. 3. Open RDM. 4. Enable touch simulation by clicking the hand icon in the viewport toolbar. 5. Hold the left click pressed in the viewport. It appears to reproduce on at least macOS 10.11 and Windows 10 for me.
Blocks: 1292133
Keywords: regression
Assignee: nobody → jryans
Status: NEW → ASSIGNED
Iteration: --- → 52.3 - Nov 14
Priority: P3 → P1
Comment on attachment 8806513 [details] Bug 1300103 - Use correct coordinates in simulated contextmenu event. https://reviewboard.mozilla.org/r/89908/#review89586 ::: devtools/shared/touch/simulator-core.js:239 (Diff revision 1) > Ci.nsIDOMMouseEvent.MOZ_SOURCE_TOUCH); > }, > > - sendContextMenu(target, x, y) { > + sendContextMenu({ target, clientX, clientY, screenX, screenY }) { > let doc = target.ownerDocument; > - let evt = doc.createEvent("MouseEvent"); > + let MouseEvent = doc.defaultView.MouseEvent; nit: let { MouseEvent } = target.ownerDocument.defaultView; ? (looks like doc is not used anywhere else)
Attachment #8806513 - Flags: review?(poirot.alex) → review+
Comment on attachment 8806513 [details] Bug 1300103 - Use correct coordinates in simulated contextmenu event. https://reviewboard.mozilla.org/r/89908/#review89586 > nit: > let { MouseEvent } = target.ownerDocument.defaultView; > ? > (looks like doc is not used anywhere else) `doc.defaultView` gets used again for the `view` event option. I cleaned it up slightly using `let view = target.ownerDocument.defaultView;` instead of `doc`.
Pushed by jryans@gmail.com: https://hg.mozilla.org/integration/autoland/rev/22d480ab8d7e Use correct coordinates in simulated contextmenu event. r=ochameau
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
The issue is no longer reproducible on Firefox 52.0a1 (2016-11-09). The tests were performed under Windows 10x64, Mac OS X 10.11.6, Ubuntu 16.04x64.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Hello Ryan, After more investigation I noticed that this issue is still reproducible on the latest Nightly build. Also, I've retested it on Firefox 52.0a1 (2016-11-09) and it seems that it was not fixed from the beginning. I've probably used the STR from Comment 0 instead of the STR from Comment 1 while verifying this bug. Should I reopen this one, or it is better to log a new bug?
Flags: needinfo?(jryans)
(In reply to Mihai Boldan, QA [:mboldan] from comment #10) > Hello Ryan, > > After more investigation I noticed that this issue is still reproducible on > the latest Nightly build. > Also, I've retested it on Firefox 52.0a1 (2016-11-09) and it seems that it > was not fixed from the beginning. I've probably used the STR from Comment 0 > instead of the STR from Comment 1 while verifying this bug. > Should I reopen this one, or it is better to log a new bug? Hmm, I am not seeing the same thing here. I am testing with Firefox 53 (2016-11-22) on macOS 10.12. Using steps from comment 1, the context menu is positioned correctly after long tapping in the viewport. Looking at comment 0, I don't think steps there actually matched your screencast. Touch simulation is clearly on in your video, so it seems like the steps in comment 1 are closely to what was used even then. Can you provide more details about your setup? Perhaps an updated video?
Flags: needinfo?(jryans) → needinfo?(mihai.boldan)
It seems that it was a misunderstanding from my side. After discussing with Ryan, we jump to the conclusion that the actual result from the Latest Nightly and Latest Aurora builds is also the expected one. It's expected for the context menu to be displayed if holding the left click while the Touch simulation is enabled.
Flags: needinfo?(mihai.boldan)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: