Closed
Bug 1065714
Opened 10 years ago
Closed 9 years ago
Right-click context menu should not be shown on the Hello panel nor the Hello conversation window
Categories
(Hello (Loop) :: Client, defect, P3)
Tracking
(firefox45 fixed)
People
(Reporter: jaws, Assigned: fcampo)
References
Details
Attachments
(1 file, 1 obsolete file)
11.03 KB,
patch
|
Mardak
:
review+
|
Details | Diff | Splinter Review |
STR: Open the Loop panel Right-click on a blank area outside of the Call URL textbox Expected: Nothing happens Actual: Get a content context menu that offers to View Source, View Page Info, etc. This menu is confusing and non-native for browser chrome. The View Source menuitem doesn't work, and the View Page Info doesn't provide any value to the user since this is considered part of the browser. I think I saw this same bug with the chat window, but I can't get the chat window to work right now to confirm.
Comment 1•10 years ago
|
||
This is kinda a duplicate of bug 1029861, but I'm going to add it as a dependency, as we may need Loop-specific things in the menus.
Depends on: 1029861
Comment 2•10 years ago
|
||
Do we need to uplift this in to Fx34? Don't get me wrong. I'd take this fix if it were available today, but I think other bugs are more pressing. (I'm asking if you're ok with my removing loop-uplift.)
Flags: needinfo?(standard8)
Flags: needinfo?(jaws)
Reporter | ||
Comment 3•10 years ago
|
||
Its presence or interaction within won't cause any functional issues, so we can remove it from the loop-uplift tracking, although it would be nice to get it fixed.
Flags: needinfo?(standard8)
Flags: needinfo?(jaws)
Updated•10 years ago
|
backlog: --- → Fx36?
Updated•10 years ago
|
backlog: Fx36? → Fx38?
Updated•9 years ago
|
Priority: -- → P3
Updated•9 years ago
|
backlog: Fx38? → backlog+
Rank: 39
Flags: firefox-backlog+
Comment 6•9 years ago
|
||
Note: Mike says the key to fixing this would be to disable the context menu on the browser element that's being created in PanelFrame.jsm. Probably just for Loop for now.
Summary: Right-click context menu should not be shown on about:looppanel → Right-click context menu should not be shown on the Hello panel nor the Hello conversation window
Comment 7•9 years ago
|
||
Sevaan: If we just remove the context menu, is that ok with you?
Flags: needinfo?(sfranks)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → fernando.campo
Assignee | ||
Comment 9•9 years ago
|
||
So far I've been unable to create a reliable test to check that the context menu is not being created, any advice is welcome Also, lets not overload Mark with more reviews :)
Attachment #8682445 -
Flags: review?(edilee)
Comment 10•9 years ago
|
||
Comment on attachment 8682445 [details] [diff] [review] Right-click context menu should not be shown on Panel nor Conversation >+++ b/browser/components/loop/content/js/panel.jsx >+ contextMenu: function(e) { I believe the naming convention is handleContextMenu. >+ e.preventDefault(); >+ return false; fcampo: is the return false required? It sounds like from 0.14, return false won't actually do what you want. https://facebook.github.io/react/docs/events.html#syntheticevent >+ <div className="fte-get-started-container" >+ onContextMenu={this.contextMenu}> We haven't been using => in jsx files... but if we did, I would have suggested: onContextMenu={e => e.preventDefault()}> :( ;) dmose: for test, I wonder if checking for focus is reliable? Some reason I feel that Linux is probably going to do something different. Any suggestions for a test? Or just skip covering this with a unit test?
Flags: needinfo?(fernando.campo)
Flags: needinfo?(dmose)
Comment 11•9 years ago
|
||
The "simple" unit test would be to check that e.preventDefault is called when simulating a context click. Though we probably want to do something more from the mochitest side to ensure that this integrates with the browser as expected (this is a slightly different solution to comment 6, which possibly wouldn't have required a test, but in some ways is nicer as its the content code controlling it).
Assignee | ||
Comment 12•9 years ago
|
||
Tests added (following :Standard8 advice, only checking that preventDefault is called) Changed function name following convention Decided not to start using arrow functions to follow same code pattern than it's used (I think it's easier to read with function call in the prop)
Attachment #8682445 -
Attachment is obsolete: true
Attachment #8682445 -
Flags: review?(edilee)
Attachment #8683637 -
Flags: review?(edilee)
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(fernando.campo)
Comment 13•9 years ago
|
||
Comment on attachment 8683637 [details] [diff] [review] Right-click context menu should not be shown on Panel nor Conversation I'll land this.
Flags: needinfo?(dmose)
Attachment #8683637 -
Flags: review?(edilee) → review+
Comment 14•9 years ago
|
||
Comment on attachment 8683637 [details] [diff] [review] Right-click context menu should not be shown on Panel nor Conversation >+++ b/browser/components/loop/test/desktop-local/panel_test.js >+ TestUtils.Simulate.contextMenu( >+ view.getDOMNode(), >+++ b/browser/components/loop/test/desktop-local/roomViews_test.js >+ it("should NOT show the context menu on right click", function() { >+ var prevent = sandbox.stub(); Fyi, I fixed the indent when landing.
Comment 15•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/bbdb386545e290c40780aae83218b52ce6708bcd Bug 1065714 - Right-click context menu should not be shown on Panel nor Conversation [r=Mardak]
Comment 16•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bbdb386545e2
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•