Closed Bug 2020927 Opened 3 months ago Closed 3 months ago

RichTextArea of GWT project is broken in Firefox 148

Categories

(Core :: DOM: Navigation, defect)

Firefox 148
defect

Tracking

()

VERIFIED FIXED
150 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox148 + verified
firefox149 + verified
firefox150 + verified

People

(Reporter: tatu, Assigned: hsivonen)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Steps to reproduce:

We have observed that RichTextArea from GWT project is broken. We use the widget in older versions of Vaadin. The component worked ok with Firefox 147, but is broken in Firefox 148.

Actual results:

There is live demo here for you to check:

https://demo.vaadin.com/sampler/#ui/data-input/text-input/rich-text-area

Try to use e.g. Bold, Italic, etc. buttons. Observe that they do not work. This used to work in Firefox 147.

Expected results:

There seems to be some glitch with focus.

E.g. Bold button should first focus document window, which is in edit mode, and the executes toggle bold command.

If I pick the iframe in Firefox console as temp0 and the button element as temp1, I can do the following:

temp1.addEventListener('click', (e) => temp0.contentWindow.focus());

temp0.contentWindow.addEventListener('focus', (e) => { temp0.contentWindow.document.execCommand('Bold', false, 'false'); console.log('Toggled'); });

Which will work, i.e. when the toggle is done within the focus event, that works.

Also if I click edit area manually and then execute from console:

temp0.contentWindow.document.execCommand('Bold', false, 'false')

The toggling works

What the component does normally is equivalent of

temp1.addEventListener('click', (e) => { temp0.contentWindow.focus(); temp0.contentWindow.document.execCommand('Bold', false, 'false'); } );

And that is now failing in Firefox 148, but it was working in Firefox 147.

The weird thing is that I cannot workaround it with setTimeout function.

Severity: -- → S2
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → DOM: Navigation
Product: Firefox → Core
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED

Shippable-config builds for 64-bit Linux, Mac, and Windows coming up in https://treeherder.mozilla.org/jobs?repo=try&landoCommitID=183470

Keywords: regression
Regressed by: sync-about-blank

Set release status flags based on info from the regressing bug 543435

Blocks: 2021253
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch

The patch landed in nightly and beta is affected.
:hsivonen, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(hsivonen)

Tracked for Fx148 release. To add to Comment 7, please also add a release uplift request

This may be too late for Fx148. It has not been uplifted to beta yet, and the planned Fx148 dot release builds tomorrow.

Attachment #9550962 - Flags: approval-mozilla-release?
Attachment #9550969 - Flags: approval-mozilla-beta?
Attachment #9550971 - Flags: approval-mozilla-release?

firefox-beta Uplift Approval Request

  • User impact if declined: The rich text editor component of GWT doesn't work in Firefox.

(Sorry about the large number of duplicate uplift requests for the dependency. The UI for this scenario is not great.)

  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: On both https://demo.vaadin.com/sampler/#ui/data-input/text-input/rich-text-area and https://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwRichText , test that you can enter some text into the editor area and test that you can then select some text that you entered and make it bold using the B button in the toolbar above the editor area.
  • Risk associated with taking this patch: low
  • Explanation of risk level: This extends a pre-existing compat hack and the conditions for this new activation (particular class name, particular name of an item in the global scope, and absence of the src attribute) are narrow enough for it to be implausible for the compat hack to activate when not intended.
  • String changes made/needed: There is a new string for a console message in a .properties file.
  • Is Android affected?: yes

firefox-release Uplift Approval Request

  • User impact if declined: The rich text editor component of GWT doesn't work in Firefox.

(Sorry about the large number of duplicate uplift requests for the dependency. The UI for this scenario is not great.)

  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: On both https://demo.vaadin.com/sampler/#ui/data-input/text-input/rich-text-area and https://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwRichText , test that you can enter some text into the editor area and test that you can then select some text that you entered and make it bold using the B button in the toolbar above the editor area.
  • Risk associated with taking this patch: low
  • Explanation of risk level: This extends a pre-existing compat hack and the conditions for this new activation (particular class name, particular name of an item in the global scope, and absence of the src attribute) are narrow enough for it to be implausible for the compat hack to activate when not intended.
  • String changes made/needed: None. This patch for release removes the parts of the nightly and beta changes that involved a console message. That is, the compatibility hack in this version of the patch takes place without a use counter and without a console message.
  • Is Android affected?: yes
Attachment #9550962 - Attachment is obsolete: true
Attachment #9550962 - Flags: approval-mozilla-release?

(In reply to Donal Meehan [:dmeehan] from comment #8)

Tracked for Fx148 release. To add to Comment 7, please also add a release uplift request

Added uplift requests. I requested uplifts for the dependency first, so it got duplicate requests. The UI for this scenario is hard to figure out. Sorry.

Flags: needinfo?(hsivonen)

(I built and manually tested the uplifts locally.)

In case it's not OK to uplift the new string into beta, either, the patch here for the release branch would also apply to beta if applied instead of the one that I requested uplift for.

Attachment #9550971 - Flags: approval-mozilla-release? → approval-mozilla-release+
Attachment #9550969 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift] [qa-triage-done-c150/b149] [qa-ver-needed-c150/b149]
Flags: qe-verify+

Reproduced the issue with Firefox 150.0a1 (2026-03-04) on Windows 11 by following steps from comment 13.
The issue is verified fixed with Firefox 150.0a1 (2026-03-09), 149.0b7 (comment 19) and 148.0.2. The text can be successfully entered inside the test cases from comment 13 and formatted as bold, italic, or underlined.

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift] [qa-triage-done-c150/b149] [qa-ver-needed-c150/b149] → [uplift] [qa-triage-done-c150/b149] [qa-ver-done-c150/b149]
Flags: qe-verify+
Blocks: 2022476

For future reference:

  • Firefox 147 didn't show this issue, because sync about:blank was not yet there.
  • Firefox 148.0.0 didn't work with the GWT RichTextArea, because sync about:blank was there but this compat hack was not.
  • Firefox 148.0.2 has the compat hack without a message to the console in dev tools and without a use counter, and the compat hack requires building the GWT app with the default linker options that put GwtPotentialElementShim in the global scope.
  • Firefox 149 and later look for __gwt_stylesLoaded in the global scope instead (bug 2022476), so the compat hack should work with any GWT linking alternatives. There is a message to the console in dev tools and a use counter.
See Also: → 2033840
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: