Closed Bug 1612122 Opened 4 years ago Closed 4 years ago

Copy / Cut options from context menu are available on empty searchbar

Categories

(Firefox :: Search, defect, P3)

defect
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 75
Iteration:
75.1 - Feb 10 - Feb 23
Tracking Status
firefox-esr68 --- unaffected
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- verified
firefox75 --- verified

People

(Reporter: csasca, Assigned: standard8)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached video Context menu.mov

Affected versions

  • Firefox 74.0a1
  • Firefox 73.0b11
  • Firefox 72.0

Affected platforms

  • Windows 10 & 7
  • macOS 10.13
  • Ubuntu 18.04

Steps to reproduce

  1. Open Firefox and go to Options / Preferences
  2. Enable the search bar
  3. Right click on the added search bar

Expected result

  • The copy / cut options are greyed out as there is no input text

Actual result

  • The copy / cut options are available

Regression range

  • I will see for a regression. On a look over, 69.0b8 seems to not be affected, but
    71.0 is affected.

Additional notes

  • The behavior can be seen in the attachment
  • Context menu options both in pages and the search bar from toolbar are affected by this issue.
  • A page affected by this is example.
  • 68.4.2esr is affected too.
  • If considered, a separate bug should be opened for the issue on pages, as opposed to just the search bar.

The regression window is likely really useful here.

Flags: needinfo?(catalin.sasca)

It is intentional behavior for web page at least, see Bug 1271897 comment#5.
However, the context menu of the search bar is broken. i.e. Cut, Copy, Paste, Delete are always enabled. But Paste & Search is OK.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a4bfd6e22c412a65d558d46c6a3f19da14a03a85&tochange=9ec431469e3777c3c9675e7699a38e3155ada5dd

Regressed by: 1534455
Summary: Copy / Cut options from context menu are available on empty search or pages with forms → Copy / Cut options from context menu are available on empty searchbar
Component: Menus → Search

Thanks Alice for looking for the regression range, and for the additional finds.

Flags: needinfo?(catalin.sasca)
See Also: → 1611308
Has Regression Range: --- → yes
Has STR: --- → yes

:ntim, per comment #2 your patch looks like it regressed this. Can you take a look please?

Flags: needinfo?(ntim.bugs)
Priority: -- → P3
Assignee: nobody → ntim.bugs
Flags: needinfo?(ntim.bugs)

Usually, editMenuOverlay.js or moz-input-box would handle this, but searchbar.js uses its own implementation to append its own menu items. Ideally, editMenuOverlay.js would provide a mechanism for this, which would allow both moz-input-box and searchbar.js to stop existing, but that's out of scope.

Attachment #9124450 - Attachment description: Bug 1612122 - Set disabled state of searchbar menu items. → Bug 1612122 - Set disabled state of searchbar context menu items.
Assignee: ntim.bugs → standard8
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61fceb15f2a5
Set disabled state of searchbar context menu items. r=daleharvey
Regressions: 1615629
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75

Please nominate this for Beta uplift when you're comfortable doing so.

Flags: needinfo?(standard8)
Flags: in-testsuite+
Flags: needinfo?(standard8) → qe-verify+

Comment on attachment 9124450 [details]
Bug 1612122 - Set disabled state of searchbar context menu items.

Beta/Release Uplift Approval Request

  • User impact if declined: Confusing state of context menu items on the search bar context menu.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 0
  • List of other uplifts needed: Bug 1615629
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small, focussed, change to how the search bar context menu is set up.

Note: Bug 1615629 is tier-2 test-only but useful to uplift at the same to avoid extra orange.

  • String changes made/needed: None
Attachment #9124450 - Flags: approval-mozilla-beta?
Iteration: --- → 75.1 - Feb 10 - Feb 23
Points: --- → 2

Comment on attachment 9124450 [details]
Bug 1612122 - Set disabled state of searchbar context menu items.

On nightly for a week without regressions, uplift approved for 74.0b7, thanks.

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

Sheriffs, could you please also land the patch from bug 1615629 with a=test-only ? Otherwise, there will be a tier-2 test verify failure. Thank you!

QA Whiteboard: [qa-triaged]

Reproduced the issue on Windows 10/ MacOS 10.13 using Firefox 73.0 (20200207195153)
Verified fixed on Firefox Nightly 75.0a1 (20200223214228) and Firefox Beta 74.0b7 (20200221211950)

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

Attachment

General

Created:
Updated:
Size: