Closed Bug 2066241 Opened 3 months ago Closed 2 months ago

Let a text context menu item set go above the standard items, and give it the contextmenu event

Categories

(Toolkit :: UI Widgets, task, P3)

task

Tracking

()

RESOLVED FIXED
157 Branch
Tracking Status
firefox157 --- fixed

People

(Reporter: dao, Assigned: dao)

References

Details

(Whiteboard: [sng][mcab-hnt])

Attachments

(1 external file)

Bug 2064369 added EditContextMenu.addItems() so consumers can contribute items to the shared text context menu. Moving the last consumer of moz-input-box -- Thunderbird's compose subject field, bug 2066237 -- needs two things it doesn't offer.

An item set can only be placed with after, an item id, and goes last by default. A spellchecking menu straddles the standard items: suggestions and add-to-dictionary above, the enable toggle and dictionary list below. The standard items start at edit-contextmenu-undo, so the leading block has nothing to anchor to. A before option, symmetric with after, covers it.

onShowing gets the input and the set's items, but not the contextmenu event. InlineSpellChecker.initFromEvent resolves the clicked word from the event's rangeParent and rangeOffset, so a spellchecking set can't tell which word the menu was opened over.

Blocks: 2066237
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Depends on: 2066238

The consumer is Thunderbird's compose subject field (bug 2066237), so nothing in this tree uses either yet.

Whiteboard: [sng][mcab-hnt]
Severity: -- → N/A
Priority: -- → P3
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bb169fb8a52a https://hg.mozilla.org/integration/autoland/rev/d0de0d71e928 Let an item set go above the standard text context menu items, and give it the contextmenu event. r=tgiles
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 157 Branch
No longer blocks: 2064369
Depends on: 2064369
QA Whiteboard: [qa-triage-done-c158/b157]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: