Closed Bug 1432070 Opened 2 years ago Closed 2 years ago

[Form Autofill] Manage and Edit dialogs show web page contextmenu on right click

Categories

(Toolkit :: Form Autofill, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: Kwan, Assigned: Kwan)

Details

Attachments

(1 file)

STR:
1) Open either "Saved Addresses…" or "Saved Credit Cards…" dialogs
1b) [Optional] Open either of "Add…" or "Edit…" dialogs
2) Right click anywhere

ER:
nothing
(or text-specific commands: Undo|Cut/Copy/Paste/Delete|Select All if on a text input in the edit dialogs)

AR:
web page context menu is shown

Unfortunately there's not a perfect solution here I don't think.  It's very easy to stop the contextmenu entirely, but then that loses the textcontrol options.
Can keep the menu around just for text fields, but in addition to the desired editing controls it also has the "This Frame" submenu and "Inspect Element" item.
Main preference fields get their menu from XBL https://searchfox.org/mozilla-central/rev/e9a067a401e41017766f4ab90bc3906603273d51/toolkit/content/widgets/textbox.xml#404
I think the only way to get the same behaviour on these fields would be re-implementing the entire menu manually.

Will attach a patch with the keep-on-input-fields solution.
Attachment #8944318 - Flags: review?(lukechang1209)
Comment on attachment 8944318 [details]
Bug 1432070 - Block context menu in Autofill preference dialogs, except on text fields.

https://reviewboard.mozilla.org/r/214544/#review221932

Hi Ian, Thanks for patching this. For some reason, I've been being inactive for a while so I'm afraid I can't review your patch any time soon. Would you mind asking someone else in the team for help? Thanks and sorry for the inconvenience.
Attachment #8944318 - Flags: review?(lukechang1209)
Attachment #8944318 - Flags: review?(scottcwwu)
Comment on attachment 8944318 [details]
Bug 1432070 - Block context menu in Autofill preference dialogs, except on text fields.

https://reviewboard.mozilla.org/r/214544/#review221932

No problem Luke, thanks for the heads up!
Comment on attachment 8944318 [details]
Bug 1432070 - Block context menu in Autofill preference dialogs, except on text fields.

https://reviewboard.mozilla.org/r/214544/#review222622
Attachment #8944318 - Flags: review+
Comment on attachment 8944318 [details]
Bug 1432070 - Block context menu in Autofill preference dialogs, except on text fields.

https://reviewboard.mozilla.org/r/214544/#review222940

lgtm, thanks!
Attachment #8944318 - Flags: review?(scottcwwu) → review+
Thanks Scott and Matt!

Sheriff I don't have a try for this since it seemed too trivial to waste the resources on, and there really shouldn't be any tests this should affect.
Feel free to disagree :)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/f784eac344d2
Block context menu in Autofill preference dialogs, except on text fields. r=MattN,scottwu
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f784eac344d2
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.