Closed Bug 1615142 Opened 6 years ago Closed 6 years ago

In textarea or pre element, triple-click to select line selects next line too

Categories

(Core :: DOM: Selection, defect, P2)

74 Branch
x86_64
All
defect

Tracking

()

VERIFIED FIXED
mozilla75
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- unaffected
firefox74 + verified
firefox75 --- verified

People

(Reporter: sebastian.simon1602, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached video Demo.mp4

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

A day or two ago, I triple-clicked text in a textarea to select an entire line (out of many). Alternatively, try to select a single line in the middle of a multi-line <pre> element (or a <div> with white-space: pre;, but not a <div> with <br>s for line separation) using triple-click.

I was using Firefox Nightly 74 (right before the 75 update).

Actual results:

The triple-clicked line got selected, but also the line after it. The video shows a demo of what happens. Curiously, it doesn’t happen if I triple-click a line before a link contained in that line.

Expected results:

Only the intended triple-clicked line should be selected.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → DOM: Selection
Ever confirmed: true
Keywords: regression
OS: Linux → All
Product: Firefox → Core
Regressed by: 1603964
Attached file html

[Tracking Requested - why for this release]: ux broken

Thanks for reporting :)

Assignee: nobody → emilio
Flags: needinfo?(emilio)

Oh and of course thanks alice for finding the regression range :)

We need to check for terminal new-lines on ourselves before looking at our next
sibling frame.

Flags: needinfo?(emilio)
Status: NEW → ASSIGNED
Priority: -- → P2
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3734a1392aea Fix triple-click selection on pre-formatted text. r=mats

Comment on attachment 9126454 [details]
Bug 1615142 - Fix triple-click selection on pre-formatted text. r=mats

Beta/Release Uplift Approval Request

  • User impact if declined: Comment 0
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0 or the attached HTML.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively simple fix. Alternative is backing out regressing bug (no huge deal either, but a bit unfortunate)
  • String changes made/needed: none
Attachment #9126454 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/b6ba4726dfba Fix gcc builds that error because of an unused variable.

As it just landed, I'd like to see it verified by QA on nightly before uplifting to beta.

QA Whiteboard: [qa-triaged]

Reproduced the issue on Firefox 75.0a1 (20200220093508) and on Firefox Beta 74.0b7(20200221211950)
Verified fixed on Firefox Nightly 75.0a1(20200223214228)

Comment on attachment 9126454 [details]
Bug 1615142 - Fix triple-click selection on pre-formatted text. r=mats

Covered by tests, fixes a new 74 regression, fix verified by QA on nightly, looks safe enough, uplift approved for 74.0b8, thanks.

Attachment #9126454 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified fixed on Firefox Beta 74.0b8 (20200226031638)

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: