Closed Bug 1589519 Opened 5 years ago Closed 5 years ago

"Find" in message compose window not working

Categories

(Toolkit :: UI Widgets, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
thunderbird_esr60 --- unaffected
thunderbird_esr68 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- fixed
firefox72 --- fixed

People

(Reporter: jik, Assigned: aceman)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Neither Ctrl-F nor Edit > Find... in the message compose window is working.

This appears to have broken around September 18.

mozregression reported this:

https://hg.mozilla.org/comm-central/pushloghtml?fromchange=6d3bef0ac6cee5aeb2f061163e1f5b40778f9701&tochange=dd918656e4d7e4c79ebf44d9cb4e31eec406c1de

I can reproduce.

Error in Error console:

TypeError: this._browser.sendMessageToActor is not a function findbar.js:882:23
_updateBrowserWithState chrome://global/content/elements/findbar.js:882
set _findMode chrome://global/content/elements/findbar.js:330
open chrome://global/content/elements/findbar.js:686
startFind chrome://global/content/elements/findbar.js:1084
onFindCommand chrome://global/content/elements/findbar.js:1136
doCommand chrome://messenger/content/messengercompose/ComposerCommands.js:2557
goDoCommand chrome://global/content/globalOverlay.js:101
oncommand chrome://messenger/content/messengercompose/messengercompose.xul:1

An error occurred executing the cmd_find command: [Exception... "[JavaScript Error: "this._browser.sendMessageToActor is not a function" {file: "chrome://global/content/elements/findbar.js" line: 882}]'[JavaScript Error: "this._browser.sendMessageToActor is not a function" {file: "chrome://global/content/elements/findbar.js" line: 882}]' when calling method: [nsIControllerCommand::doCommand]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 101" data: yes] globalOverlay.js:104
goDoCommand chrome://global/content/globalOverlay.js:104
oncommand chrome://messenger/content/messengercompose/messengercompose.xul:1

Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=d109b7903efb4637d877845579fc8501b132e3d3&tochange=dd918656e4d7e4c79ebf44d9cb4e31eec406c1de
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ce04e402c705c8ee9d491c3cef11a3876af2680f&tochange=b3ecb5aef45a8fb74764bb32e54567d57ed00383

Suspect by Bug 1553384

We need a resource for this and possibly a fix before shipping TB 71 beta.

Flags: needinfo?(mkmelin+mozilla)
Attached patch 1589519.patchSplinter Review

Yes, bug 1553384 helped. In compose window we have an <editor> element, but the findbar newly uses sendMessageToActor() method defined on the <browser> custom element, but not the <editor>. Implementing (copying the code) to the editor.js implementation seems to work.

The editor is implemented in toolkit so this rather looks like m-c bug, bug 1553384 started to use a function that is not available on all elements allowing the findbar.

Component: Message Compose Window → XUL Widgets
OS: Unspecified → All
Product: Thunderbird → Toolkit
Hardware: Unspecified → All
Flags: needinfo?(mkmelin+mozilla)
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/integration/autoland/rev/8c6132b079e3
copy missing sendMessageToActor() from browser-custom-element.js to editor.js. r=NeilDeakin
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Assignee: nobody → acelists

Comment on attachment 9102845 [details]
Bug 1589519 - copy missing sendMessageToActor() from browser-custom-element.js to editor.js. r=NeilDeakin

Beta/Release Uplift Approval Request

  • User impact if declined: Find function not working for pages containing <editor> element, mostly a Thunderbird compose window.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Not risky, just copied some code from browser-custom-element.js to editor.js. Just missed the branch date by a few hours.
  • String changes made/needed: None.
Attachment #9102845 - Flags: approval-mozilla-beta?

https://hg.mozilla.org/releases/mozilla-beta/rev/b5d1c242709db63fc53dffbc3ab56b3600f547fb on THUNDERBIRD710b1_2019102201_RELBRANCH.

I've put that onto a branch for TB 71 .0 beta 1 since I prefer not to ship this with a broken find function. Uplift to mozilla-beta would be appreciated so I won't have to repeat this exercise.

Comment on attachment 9102845 [details]
Bug 1589519 - copy missing sendMessageToActor() from browser-custom-element.js to editor.js. r=NeilDeakin

Low risk for Firefox as it mostly affects the use of the <editor> xul element which is mostly used in Thunderbird. on Fx nightly with no regression reported, uplift approved for 71 beta 4. Thanks.

Attachment #9102845 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Hello,

I want to verify this fix on 71.0b4, can you please tell me some steps to reproduce this bug?

Flags: needinfo?(acelists)

You'd need to verify it in Thunderbird 71 beta 1 from here: https://www.thunderbird.net/en-US/thunderbird/beta/all/

Open a compose/Write window and press Ctrl+F. Find bar appears. Trust me, it works ;-)

I don't know of a way to verify it in Firefox.

Flags: needinfo?(acelists)

Thank you for the fast reply! We only handle Firefox related issues so I will remove the qe verify+ flag so that it will not appear in our queries. Thanks again!

Flags: qe-verify+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.