Closed Bug 1601118 Opened 5 years ago Closed 5 years ago

Mana page's Find/Replace feature no longer works in Firefox 63+

Categories

(Toolkit :: Find Toolbar, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla75
Tracking Status
firefox-esr68 --- wontfix
firefox71 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- verified

People

(Reporter: cpeterson, Assigned: emilio)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(2 files)

STR

  1. Load an editable Mana page, such as https://mana.mozilla.org/wiki/display/Firefox/Fission
  2. Click the "Edit" button to edit the page.
  3. Press CTRL+F to open the Mana editor's Find/Replace toolbar.
  4. Enter a search term (such as "Fission") in the Find field and click the "Next" button.

Expected Result

The first instance of "Fission" should be highlighted in yellow. Pressing "Next" again should highlight the next instance.

Actual Result

Some instance of "Fission" is highlighted in yellow, but not necessarily the first instance on the page. Pressing "Next" does not move the highlight to any other instances of the word "Fission" on the page.

I don't see any exceptions or error messages in the DevTools web or browser consoles.

This is a regression in Firefox 63. The Mana editor's Find/Replace also broke and was fixed back in Firefox 47 (bug 1257444).

@ Emilio, could your Shadow DOM changes in bug 1455891 have broken Mana's Find/Replace?

I bisected this regression to the following pushlog regression range, but mozregression bug 1596201 prevents me from bisecting to narrower regression range:

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=afdeb0288690f0acde2ba6bd008f860e1acdd026&tochange=9849ea3937e2e7c97f79b1d2b601f956181b4629

Flags: needinfo?(emilio)

Is the mana source available somewhere? Yeah, those changes look the most likely culprit. I wish somebody would've added a test in bug 1257444... :)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)

Is the mana source available somewhere? Yeah, those changes look the most likely culprit.

Mana is just Mozilla's instance of Atlassian's Confluence wiki, which is a proprietary product. I asked Mozilla's Mana admins (in Mozilla's #mana-support Slack channel) if our Confluence license gives us access to Atlassian's source code.

https://www.atlassian.com/software/confluence

Keywords: regression

Emilio, if there is some specific Confluence question or code you need, our Mana admins have contacts with Confluence tech support. Just let me know.

Marking as wontfix for 71 as we ship this regression since 71. fix-optional for 72 to remove it from our weekly regression triage, it's unlikely we would take an uplift though. I am leaving 68ESR as affected as Confluence is enterprise software and we might take a safe fix in a future 68ESR release.

test test

Mike, can you set a priority or find an owner for this issue? It's not a recent regression, but I agree with Pascal's point that we should support this common enterprise software if we can.

This has nothing to do with the find backend, but is something local to Atlassian's implementation of that feature - which very much looks like it uses the find backend, but they implemented their own.
Therefore tentatively moving to Web Compat, but could be that Emilio knows more.

Please note that regular find-in-page using Firefox's findbar works as expected.

Severity: normal → critical
Component: Find Backend → Desktop
Flags: needinfo?(mdeboer)
Product: Core → Web Compatibility

Emilio, let us know if we can help dig in here.

:miketaylor, is it still unclear how to move this forward (tracked as carry-over regression for 74) ?

Flags: needinfo?(miket)

Sorry, fell off the radar.

Ksenia, can you look into this please?

Flags: needinfo?(miket) → needinfo?(kberezina)
Attached file 1601118.html

I've attached a reduced test case. To reproduce the behavior click "Next" button.

The problem here is that window.find(...) doesn't switch to the next item if range.surroundContents(element) is used on a current selection range.

Emilio, would you be able to take a look?

Flags: needinfo?(kberezina)

Oh that test is really awesome. Yeah, will take a look, thank you!

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

We should start seeking from the child-at-start/end-offset, rather than the
selection container.

The logic to select the starting node was backwards too...

If we're finding backwards we want to start looking from the beginning of the
range and vice versa. But I think that doesn't really matter since
nsWebBrowserFind always gives us a start range with start == end.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a03944aff45 Fix nsFind state initialization logic. r=smaug
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f1fdc659bdb Fix nsFind state initialization logic. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Is this worth uplifting at this stage? (Tomorrow's the last beta for 74)

Component: Desktop → Find Toolbar
Flags: needinfo?(emilio)
Product: Web Compatibility → Toolkit
Target Milestone: --- → mozilla75

Probably not, I wouldn't say the patch is trivial.

Flags: needinfo?(emilio)

Plus, this bug was a regression in Fx63, so we've been shipping it since 2018-10-23. :)

Flags: qe-verify+

Reproduced the initial issue using an old 70.0 RC build. Verified that the issue does not reproduce on Fx 75.0b5 across platforms (Windows 10 64bit, macOS 10.13.6 and Ubuntu 18.04 64bit) using both mana and the testcase attached to this bug.

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

Attachment

General

Created:
Updated:
Size: