Closed Bug 2066237 Opened 3 months ago Closed 2 months ago

Move the compose subject field off moz-input-box onto the shared text context menu

Categories

(Thunderbird :: Message Compose Window, task)

task

Tracking

(Not tracked)

RESOLVED FIXED
157 Branch

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(1 external file)

Bug 1586591 removes moz-input-box from toolkit. Firefox's address bar, search bar and smartbar are all off it, and the compose window's subject field is the last consumer:

mail/components/compose/content/messengercompose.xhtml:2396
  <moz-input-box spellcheck="true" style="flex: 1;">

Most of this comes for free. messengercompose.xhtml already loads editMenuOverlay.js, so EditContextMenu is in the window; the subject field is opted out of it only because moz-input-box wraps it, which is the check bug 1586591 deletes. Dropping the wrapper gives the field the standard undo/cut/copy/paste/delete/select-all menu with no further work.

What doesn't come for free is spellchecking -- the subject field is the only consumer of moz-input-box's spellcheck variant. Those items need registering with EditContextMenu.addItems() instead, driven by InlineSpellChecker, which mail/base/content/widgets/browserPopups.js already imports for the browser context menu. The item layout matches what browserPopups.inc.xhtml does: suggestions and add-to-dictionary above the standard items, enable toggle and dictionary list below.

This depends on two additions to EditContextMenu in bug 2066241 -- a before anchor, since the standard items start at undo and after has nothing to hang the leading block off, and the contextmenu event in onShowing, which is what InlineSpellChecker.initFromEvent resolves the clicked word from. Those have to land in mozilla-central first.

Also needed: toolkit/themes/shared/global-shared.css had a moz-input-box, html|input { min-width: 0 } rule and loses the moz-input-box selector, so the wrapper replacing it needs that itself.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Depends on: 2066241

The window already has the shared menu, and the field was opted out of it only by the wrapper, so the standard items need no wiring. Spellchecking does: it was the wrapper's, and it's the only part of it Thunderbird was using. The replacement wrapper carries the min-width the global sheet gave moz-input-box.

Target Milestone: --- → 157 Branch

Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/comm-central/rev/a53d0f8b12be
Move the compose subject field off moz-input-box onto the shared text context menu. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Regressions: 2080277
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: