Closed Bug 2041235 Opened 12 days ago Closed 7 days ago

invalid paste behavior with inputs in table > td

Categories

(Core :: DOM: Core & HTML, defect, P3)

Firefox 151
defect

Tracking

()

VERIFIED FIXED
153 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox151 --- verified
firefox152 --- verified
firefox153 --- verified

People

(Reporter: maxfalaleev1, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(8 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko/20100101 Firefox/151.0

Steps to reproduce:

Original issue here: https://github.com/vuejs/core/issues/14869

Open

<table>
    <thead>
    <tr>
        <th>id</th>
        <th>paste bug</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>1</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>2</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>3</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>4</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>5</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>6</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>7</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>8</td>
        test
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>9</td>
        <td><input type="text"></td>
    </tr>
    <tr>
        <td>10</td>
        <td><input type="text"></td>
    </tr>
    </tbody>
</table>

in firefox and paste text into inputs.

Actual results:

When you paste text into input sometime you can see invalid dom:

<td>...</td>
pasted text
<td>...</td>

Expected results:

no broken dom

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

cannot confirm that bug with firefox 150

Thank you for the report!
I don't seem to see issues with release Fx 151. I am using Windows.

Based on comment 2, it sounded like this may be a regression - would you mind running this tool https://mozilla.github.io/mozregression/ to capture the regression window? Knowing that piece of information would be very helpful. Another thing worth checking is to confirm if you have installed add-ons.

Thanks.

Flags: needinfo?(maxfalaleev1)

I registered on bugzilla just to confirm this bug. On Firefox Windows.
To reproduce consistently you can do something like this:

  • press ctrl and keep it pressed.
  • Move the pointer over the input box,
  • click the left button, keep it pressed, and move the pointer outside the input box.
  • So, at this moment we have: ctrl and left mb down, and pointer outside the input box.
  • Press V.
  • text is pasted outside the input box

You can even press v multiple times at that time, and the "outside-pasted-text" will pile up.
If it doesn't seem to work at first, try again, the most critic part to reproduce it is when you move the mouse outside the input box.

Attached image immagine.png

In the attached screenshot you can find a reproduction of the bug on this site.

i use next extensions:

  • uBlock Origin
  • Saby (business)
  • Stylus

Regression results:

Verdict: G

app_name: firefox
build_date: 2025-11-20
build_file: /Users/max/.mozilla/mozregression/persist/2025-11-20--mozilla-central--firefox-147.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2025/11/2025-11-20-20-36-29-mozilla-central/firefox-147.0a1.en-US.mac.dmg
changeset: a7ab407c4b2f588b662a5f6f0a01ec194ddf0e2a
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a7ab407c4b2f588b662a5f6f0a01ec194ddf0e2a&tochange=0d8d4028843afbf3d08050e3a3ec3e36b9c852bc
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: G

app_name: firefox
build_date: 2026-02-19
build_file: /Users/max/.mozilla/mozregression/persist/2026-02-19--mozilla-central--firefox-149.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/02/2026-02-19-21-52-06-mozilla-central/firefox-149.0a1.en-US.mac.dmg
changeset: 64b3c91301e828515c9f7d6d6ff8bf5e0f15a47e
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=64b3c91301e828515c9f7d6d6ff8bf5e0f15a47e&tochange=0d8d4028843afbf3d08050e3a3ec3e36b9c852bc
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: G

app_name: firefox
build_date: 2026-04-06
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-06--mozilla-central--firefox-151.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-06-21-33-46-mozilla-central/firefox-151.0a1.en-US.mac.dmg
changeset: 97bdd50d0475fcbb7bb6273e2484af8b23fdc8e4
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=97bdd50d0475fcbb7bb6273e2484af8b23fdc8e4&tochange=0d8d4028843afbf3d08050e3a3ec3e36b9c852bc
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: B

app_name: firefox
build_date: 2026-04-29
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-29--mozilla-central--firefox-152.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-29-20-34-45-mozilla-central/firefox-152.0a1.en-US.mac.dmg
changeset: 7d5cf933fd688805b2399fc2ff7f8e011a10ace9
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=97bdd50d0475fcbb7bb6273e2484af8b23fdc8e4&tochange=7d5cf933fd688805b2399fc2ff7f8e011a10ace9
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: B

app_name: firefox
build_date: 2026-04-18
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-18--mozilla-central--firefox-151.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-18-21-19-39-mozilla-central/firefox-151.0a1.en-US.mac.dmg
changeset: cb6a766e9c14daf27e0130c26cbce66d0e5b5703
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=97bdd50d0475fcbb7bb6273e2484af8b23fdc8e4&tochange=cb6a766e9c14daf27e0130c26cbce66d0e5b5703
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: G

app_name: firefox
build_date: 2026-04-12
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-12--mozilla-central--firefox-151.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-12-07-57-31-mozilla-central/firefox-151.0a1.en-US.mac.dmg
changeset: 4181bc77e2e96879d3bc85e2c05c2e4c042271d8
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=4181bc77e2e96879d3bc85e2c05c2e4c042271d8&tochange=cb6a766e9c14daf27e0130c26cbce66d0e5b5703
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: G

app_name: firefox
build_date: 2026-04-15
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-15--mozilla-central--firefox-151.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-15-21-21-14-mozilla-central/firefox-151.0a1.en-US.mac.dmg
changeset: f850e62a23fb0f218c56ff26cdcf77aedf56be4f
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f850e62a23fb0f218c56ff26cdcf77aedf56be4f&tochange=cb6a766e9c14daf27e0130c26cbce66d0e5b5703
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: B

app_name: firefox
build_date: 2026-04-17
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-17--mozilla-central--firefox-151.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-17-21-02-24-mozilla-central/firefox-151.0a1.en-US.mac.dmg
changeset: 7f96aadf4c79d5b42ee5fbddcae18dcb7237c91f
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f850e62a23fb0f218c56ff26cdcf77aedf56be4f&tochange=7f96aadf4c79d5b42ee5fbddcae18dcb7237c91f
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: G

app_name: firefox
build_date: 2026-04-16
build_file: /Users/max/.mozilla/mozregression/persist/2026-04-16--mozilla-central--firefox-151.0a1.en-US.mac.dmg
build_type: nightly
build_url: https://archive.mozilla.org/pub/firefox/nightly/2026/04/2026-04-16-15-59-48-mozilla-central/firefox-151.0a1.en-US.mac.dmg
changeset: dca1688c7da6e3af526a4212b185539a42f859e2
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=7f96aadf4c79d5b42ee5fbddcae18dcb7237c91f
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central

Verdict: B

app_name: firefox
build_date: 2026-04-17 12:02:49.083000
build_file: /Users/max/.mozilla/mozregression/persist/22fffa2cfadb-shippable--mozilla-central--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/HnZH27x6QdueqjyBxtHexA/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: 22fffa2cfadbdf897bf5df29b9a1a97c509e2e45
pushlog_url: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=22fffa2cfadbdf897bf5df29b9a1a97c509e2e45
repo_name: mozilla-central
repo_url: https://hg.mozilla.org/mozilla-central
task_id: HnZH27x6QdueqjyBxtHexA

Verdict: B

app_name: firefox
build_date: 2026-04-17 00:39:19.636000
build_file: /Users/max/.mozilla/mozregression/persist/a53c21d49573-shippable--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/UPMIge7dRy-BzfZBxWZ1oQ/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: a53c21d49573757bc39bca4f6bb20ee796eccd80
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=a53c21d49573757bc39bca4f6bb20ee796eccd80
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: UPMIge7dRy-BzfZBxWZ1oQ

Verdict: B

app_name: firefox
build_date: 2026-04-16 21:36:10.640000
build_file: /Users/max/.mozilla/mozregression/persist/a77a08b9be8a-shippable--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/V4PpsBbdTOi2NcUAoePeSw/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: a77a08b9be8a059936afa68f259adb86823bb75f
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=a77a08b9be8a059936afa68f259adb86823bb75f
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: V4PpsBbdTOi2NcUAoePeSw

Verdict: B

app_name: firefox
build_date: 2026-04-16 13:54:18.046000
build_file: /Users/max/.mozilla/mozregression/persist/88d9586c6145--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/aAOo4vxySsKXK39JrkLKOw/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: 88d9586c614511197fcae796f9df1e20104f460c
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=88d9586c614511197fcae796f9df1e20104f460c
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: aAOo4vxySsKXK39JrkLKOw

Verdict: B

app_name: firefox
build_date: 2026-04-16 13:07:17.449000
build_file: /Users/max/.mozilla/mozregression/persist/91b049fb878f-shippable--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/JtWy4qWHTDSEhGG0Pe2IkQ/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: 91b049fb878fd57dd44d2cf4c7a20e18cb4d9fb1
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=91b049fb878fd57dd44d2cf4c7a20e18cb4d9fb1
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: JtWy4qWHTDSEhGG0Pe2IkQ

Verdict: B

app_name: firefox
build_date: 2026-04-16 12:51:00.370000
build_file: /Users/max/.mozilla/mozregression/persist/489d951cca9a-pgo--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/NgJaCG9bRmuwA2Lr8V6R0Q/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: 489d951cca9a543d935d22c13d0ba3da7e3debe8
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=dca1688c7da6e3af526a4212b185539a42f859e2&tochange=489d951cca9a543d935d22c13d0ba3da7e3debe8
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: NgJaCG9bRmuwA2Lr8V6R0Q

Verdict: G

app_name: firefox
build_date: 2026-04-16 12:34:52.024000
build_file: /Users/max/.mozilla/mozregression/persist/0883dcef2cfc--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/N9I4MzCfR6Chyo7WlHwnFg/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: 0883dcef2cfcac2fbe396882403988a900e1c345
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=0883dcef2cfcac2fbe396882403988a900e1c345&tochange=489d951cca9a543d935d22c13d0ba3da7e3debe8
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: N9I4MzCfR6Chyo7WlHwnFg

Verdict: G

app_name: firefox
build_date: 2026-04-16 12:44:08.641000
build_file: /Users/max/.mozilla/mozregression/persist/9ab2c0f09488-shippable--autoland--target.dmg
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Of9OrC5dSpO-rJzBT87mkA/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg
changeset: 9ab2c0f09488457e2b72228d5ebb043fd503460f
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9ab2c0f09488457e2b72228d5ebb043fd503460f&tochange=489d951cca9a543d935d22c13d0ba3da7e3debe8
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: Of9OrC5dSpO-rJzBT87mkA
Flags: needinfo?(maxfalaleev1)
Attached image mozregression.png

Thanks for the new STR in comment 4 and the bisect effort.

I am able to reproduce it consistently following comment 4 and I got this regressor: bug 2031834. NI Emilio for this regression.

I CC the patch author of bug 2025072 in case they have things to add, though it looks to me that this bug 2025071 is less likely the regressor as this was about networking changes for Android.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(emilio)
Keywords: regression
Regressed by: 2031834

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

Which URL are you using to repro that? I don't seem to be able to repro on Linux. I mean, something is still off and I'll look at it, but I don't get text outside the input or so...

Flags: needinfo?(htsai)

Hi Emilio, I just tried and was able to reproduce the issue in the test case you created.

Attached image immagine.png

I also tried in a private window, just to rule out extensions.

Huh, maybe windows-specific?

Don't know.. so far it looks like it has been reproduced only on Windows, and unfortunately I don't have a Linux machine or a Mac to test it.
Consider that yesterday, when my wife told me: 'Hey, the admin I'm working on is behaving weirdly!', it took me more than an hour of attempts to isolate the exact steps to reproduce it. :) But now, with those steps, I believe we have a pretty solid reproduction, so I assume that it's really not occurring on your Linux machine, and not that you haven't been 'lucky' enough so far to stumble upon it.
Hover the input, Ctrl (hold), left click (hold), draw the pointer out of the input, press v with l-mouse and ctrl still pressed.

I was using https://bugzilla.mozilla.org/query.cgi?format=specific . And yup, I used Windows

Flags: needinfo?(htsai)

Huh, maybe windows-specific?

I can confirm, bug reproduced on windows and mac os.

:hsinyi, could this be triaged for priority/severity?

Flags: needinfo?(htsai)
Assignee: nobody → emilio
Severity: -- → S3
Flags: needinfo?(htsai)
Flags: needinfo?(emilio)
Priority: -- → P3

I haven't been able to reproduce this bug consistently, but I did manage
to trigger some assertions here:

https://searchfox.org/firefox-main/rev/8097ef6fac6522ded33f1e2d4d521c16331be5db/dom/base/nsContentUtils.cpp#8470-8477

And pretty sure it's the same root cause... Before my patch, mouse
events weren't routed outside the scroller which papered over this
issue.

Status: NEW → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

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

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)

(In reply to Hsin-Yi Tsai (she/her)[:hsinyi] from comment #17)

I was using https://bugzilla.mozilla.org/query.cgi?format=specific . And yup, I used Windows

I can verify that the issue is fixed with the latest nightly build May 26, 2026.

Status: RESOLVED → VERIFIED

I haven't been able to reproduce this bug consistently, but I did manage
to trigger some assertions here:

https://searchfox.org/firefox-main/rev/8097ef6fac6522ded33f1e2d4d521c16331be5db/dom/base/nsContentUtils.cpp#8470-8477

And pretty sure it's the same root cause... Before my patch, mouse
events weren't routed outside the scroller which papered over this
issue.

Original Revision: https://phabricator.services.mozilla.com/D302364

Attachment #9589714 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Fixes recent regression.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Targetted fix to table selection codepath.
  • String changes made/needed?: none
  • Is Android affected?: yes
Flags: qe-verify+

I haven't been able to reproduce this bug consistently, but I did manage
to trigger some assertions here:

https://searchfox.org/firefox-main/rev/8097ef6fac6522ded33f1e2d4d521c16331be5db/dom/base/nsContentUtils.cpp#8470-8477

And pretty sure it's the same root cause... Before my patch, mouse
events weren't routed outside the scroller which papered over this
issue.

Original Revision: https://phabricator.services.mozilla.com/D302364

Attachment #9589715 - Flags: approval-mozilla-release?

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: Fixes recent regression.
  • Code covered by automated testing?: yes
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: yes
  • Steps to reproduce for manual QE testing: comment 0
  • Risk associated with taking this patch: low
  • Explanation of risk level: Targetted fix to table selection codepath.
  • String changes made/needed?: none
  • Is Android affected?: yes
Flags: needinfo?(emilio)
Attachment #9589714 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [uplift][qa-ver-needed-c153/b152]
Attachment #9589715 - Flags: approval-mozilla-release? → approval-mozilla-release+

Reproduced the issue with Firefox 153.0a1 (2026-05-25) on Windows 11 by using steps from comment 0 and comment 4.
The issue is verified fixed with Firefox 153.0a1 (2026-06-01), 152.0b6 and 151.0.3 on Windows 11, macOS 26 and Ubuntu 24. Pasting text after following steps from comment 1 or comment 4 no longer breaks the text field.

Has STR: --- → yes
QA Whiteboard: [uplift][qa-ver-needed-c153/b152] → [uplift][qa-ver-done-c153/b152]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: