Closed Bug 1701638 Opened 4 years ago Closed 4 years ago

middle-clicking on tab insert text into address bar

Categories

(Firefox :: Address Bar, defect, P3)

Firefox 87
Desktop
All
defect
Points:
3

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- unaffected
firefox87 --- wontfix
firefox88 --- wontfix
firefox89 --- verified

People

(Reporter: exynil, Assigned: daisuke)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached video 20210329-183013.mp4 (deleted) —

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

Steps to reproduce:

Firefox version: 87.0

  1. Copy MULTI-LINE text
  2. Open firefox
  3. Open a new tab
  4. Close the old tab

Actual results:

The tab is closed and the text from the clipboard is pasted into a new tab

Expected results:

Close a tab without pasting text from the clipboard into a new tab

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser
Status: UNCONFIRMED → NEW
Ever confirmed: true

I can reproduce on Nightly 89.0a1 Ubuntu20.04.
And I can also reproduce on Windows if middlemouse.paste = true.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=81bec1bb5b4e34a819dc9159b194f1896edd2436&tochange=22e706c2ff1d4469907bc44c8c1bc256512553e7

Has Regression Range: --- → yes
Has STR: --- → yes
Component: Tabbed Browser → Address Bar
Keywords: regression
OS: Unspecified → All
Regressed by: 1185358
Hardware: Unspecified → Desktop

Daisuke, do you have time to look at this?

Severity: -- → S3
Points: --- → 3
Flags: needinfo?(daisuke)
Priority: -- → P3

Thank you very much for reporting, Maxim!
And also, thank you very much for confirming, Alice0775!

Yes, I also could reproduce this issue on the current m-c on Ubuntu 18.04.5 LTS.
(Could not reproduce it on OSX 10.14.6 with/without middlemouse.paste pref)
I will take a look at this.

(Thank you for letting me know, Drew!)

Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Flags: needinfo?(daisuke)

Sorry, I could reproduce it on OSX as well.

I investigated the reason for this issue.
First, even if we get rid of the patch of bug 1185358, we can reproduce a similar issue.

STR:

  1. Copy the following multiline test.
java
script:alert(1);
  1. Paste with middle click

Then a tab will be removed and alert(1); is pasted to the URLBar by https://hg.mozilla.org/mozilla-central/rev/e4a60e1d9ef527ebc960f7ebc589b24e9d7681b1#l1.12 .

It seems that a fundamental fix is needed, such as when the tab is removed by middle-clicking, avoid pasting the value.

Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f22e93f12cc6 Call preventDefault for middle click event on a tab to avoid pasting by the event. r=masayuki,adw
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
Flags: qe-verify+

I've verified that if I middle-click to the right of the plus sign, the one that opens a new tab, a mew tab is opened with the text copied on the address bar. As mentioned above, I have middlemouse.paste = true. Is this the expected result?

Flags: needinfo?(daisuke)

Thank you very much for the verifying and the reporting, Florencia!
Yeah, that is an unexpected result. Now, we are fixing the issue in bug 1710289.
Thanks.

Flags: needinfo?(daisuke)

Hi,
Thanks for the answer. Then I've verified that this has been fixed on Beta 89.0b10.

Regards, Flor.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Duplicate of this bug: 1696974
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: