Closed Bug 1882725 Opened 7 months ago Closed 6 months ago

Context menu API does not work in entire compose body

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect

Tracking

(thunderbird_esr115 wontfix)

RESOLVED FIXED
125 Branch
Tracking Status
thunderbird_esr115 --- wontfix

People

(Reporter: tdulcet, Assigned: TbSync)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

  1. Install any add-on the works on selected or editable text in the compose window, such as my Unicodify add-on.
  2. Write a long message that requires scrolling in the compose window.
  3. At the top of message, select some text and open the context menu. Confirm that the context menu entries show as expected.
  4. Scroll to the bottom of the message (below the fold), select some text and open the context menu.

Actual results:
The context menu entries show for #3, but not for #4.

Expected results:
The context menu entries should show for both #3 and #4.

It seems this was not fully fixed in Bug 1716976, but note that it affects more than just the "editable" context. I tested in both Thunderbird 115.8 and the latest Thunderbird Daily 125.

This bug was first reported downstream on GitHub by a user of my Unicoidify add-on.

Flags: needinfo?(john)
Status: NEW → UNCONFIRMED
Ever confirmed: false
Flags: needinfo?(john)
Status: UNCONFIRMED → NEW
Ever confirmed: true

The reported bug is completely unrelated to Bug 1716976.

The menu build function dies here:
https://searchfox.org/comm-central/rev/e1abb7d564a6d0a518e18e0cae0b76939a100169/mail/components/compose/content/MsgComposeCommands.js#1983

Will investigate why.

This was regressed 3 years ago in Bug 1719985.

Regressions: 1719985

This fixes a regression introduced 3 years ago in Bug 1719985. If the
compose window has lots of text and is scrolled to the bottom, the
context menu will not have all entries and the spellchecker throws:

can't access property "ownerGlobal", element is null

According to MDN, elementFromPoint() needs coordinates relative to
the view port, but it currently gets coordinates relative to the document.

Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by daniel@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/a169ab55935d
Fix wrong coordinates used in editor.contentDocument.elementFromPoint(). r=aleca

Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED

Thank you John for the quick fix! I confirmed that it works as expected now on TB Daily.

I do not have permission to set the flags correctly, but can the fix please be uplifted to TB 115 ESR.

Keywords: regression
Regressed by: 1719985
No longer regressions: 1719985
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: