Open Bug 1993527 Opened 11 months ago Updated 11 months ago

Word select with double-click selects alt-text of neighboring image link when nowrap

Categories

(Core :: DOM: Selection, defect)

Firefox 143
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ajgoda90, Unassigned)

References

(Depends on 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0

Steps to reproduce:

  1. Have text followed by an image link like this with white-space set to nowrap:
    <div style="white-space: nowrap">
    Testing This Link
    <a href="https://bugzilla.mozilla.org/"><img src="https://bugzilla.mozilla.org/static/v20251008.1/extensions/BMO/web/images/moz-fav-one-color-white-rgb.svg" title="Title Text" alt="Alt Text"></a>
    </div>
  2. Have layout.word_select.eat_space_to_next_word set to true, which is the default.
  3. Double click the last word in the text to select it.
  4. Ctrl-C to copy.
  5. Paste the copied text.

Actual results:

The Alt-Text of the image in the image link is included in the selection and gets copied and pasted with the selected word.

Expected results:

The alt-text should not have been included in the selection or been copied.

Bug 637895 is similar.
Bug 423859 requests that the default of layout.word_select.eat_space_to_next_word be changed to false, which would reduce incidence of this bug.

Component: Untriaged → DOM: Serializers
Product: Firefox → Core
Component: DOM: Serializers → DOM: Selection
Severity: -- → S3
Depends on: 423859
See Also: → 637895
You need to log in before you can comment on or make changes to this bug.