Closed Bug 1747539 Opened 3 years ago Closed 3 years ago

"Paste" in search form on the new page using the context menu drops the first pasted word

Categories

(Firefox :: Address Bar, defect, P3)

Firefox 95
defect
Points:
3

Tracking

()

VERIFIED FIXED
97 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- verified

People

(Reporter: enverest, Assigned: bugzilla)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

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

Steps to reproduce:

  1. Copy any text
  2. Open new tab in Firefox
  3. Right click on Search form in the center of the new page.
  4. Select "Paste" from the context menu.

Actual results:

Your insertion point will be moved to the address bar, but no text will be pasted.

Expected results:

The text from clipboard should be pasted.

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

Component: Untriaged → Address Bar

I couldn't managed to reproduce this issue on Ubuntu 20.04 x64. The text is correctly pasted in the address bar.
Please try if issue occurs in troubleshoot mode. Here is a link that can help you do that:
 https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

Thanks.

Flags: needinfo?(enverest)

I did try in Troubleshoot mode and the result was the same.
After this I tried in Windows 10 (Firefox 95.0.2) and I discovered one more detail - it drops first word in the sentence. Both Windows and Ubuntu.

Here is what I mean:
a) If I have in clipboard "Heavy Rain" - only "Rain" will be pasted.
b) If I have "Exiting Troubleshoot Mode" - only "Troubleshoot Mode" will be pasted.

Flags: needinfo?(enverest)

One more note - if I paste using hot keys (Ctrl + V) there is no issue. The issue occurs only if I use "Paste" from context menu.

With help of community I find 1 more condition. Search suggestions should be turned on, except for address bar.
about:preferences#search

(I didn't find how to attach a file to the comment, so here is the link to an image)
https://sun9-46.userapi.com/impg/Kab3djYnwO8jsIrl2Mhb00nMlJmLMunhaFqHjA/Hi7mNZEKw3s.jpg?size=990x742&quality=96&sign=5053902f48094e003d36b17b3218f737&type=album

Thanks, confirming the problem happens when pasting from the context menu. It does not happen with the key shortcut or Edit > Paste menu. This might not be an address bar bug, but we can keep it here for now until it's investigated.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: "Paste" in search form on the new page does NOT paste. → "Paste" in search form on the new page using the context menu drops the first pasted word

When this line is commented out the bug goes away: https://searchfox.org/mozilla-central/rev/e095d7842240fc02f2cbbf20f75345aadf6ae6f7/browser/components/urlbar/UrlbarInput.jsm#1406

The problem is we can set searchMode on this line, but then we assume if searchMode is defined then the first token necessarily is a restriction token. In this case it's not.

Points: --- → 3
QA Whiteboard: [qa-regression-triage]

[Regression range]:

Last good: build id=20210722150628
First bad: build id=20210722154854
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b7a98f400dc5540ba5291a096eed0d1127df8ced&tochange=71d99327b252a78f3950cab6bbb1bf0c38c012ff

Bug 1713827 - Hand off to search mode if searching is disabled in the Urlbar. r=amy,Standard8,flod
This patch also addresses bug 1645293. It essentially reverts parts 1 and 3 of bug 1616700 for users with searching disabled. Since we had to introduce branching behaviour, there are some new constructs like a shouldHandOffToSearchMode multi-pref in UrlbarPrefs.

Has Regression Range: --- → yes
Has STR: --- → yes
QA Whiteboard: [qa-regression-triage]
Regressed by: 1713827

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

Flags: needinfo?(htwyford)
Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Pushed by htwyford@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40faf4a39038 Only strip first token in search() if it is a restriction token. r=adw
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Flags: qe-verify+
Flags: needinfo?(bugzilla)

I have reproduced this issue from comment 3, using Firefox 97.0a1 (2021.12.24) on Win 10 x64.
I can confirm this issue is fixed, I verified using Firefox 97.0b9 on Win 10 x64, macOS 10.15 and Ubuntu 20.04 x64.

Status: RESOLVED → VERIFIED
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: