Closed Bug 1600953 Opened 5 years ago Closed 5 years ago

The tip is permanently dismissed when clicking anywhere inside the tip but outside the "OK, Got It" button

Categories

(Firefox :: Address Bar, defect, P1)

Desktop
All
defect
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 73
Iteration:
73.1 - Dec 2 - Dec 15
Tracking Status
firefox72 --- verified
firefox73 --- verified

People

(Reporter: srosu, Assigned: adw)

References

Details

Attachments

(2 files)

Attached video TipsAreDismissed.mp4 (deleted) —

[Affected versions]:

  • Latest Firefox Nightly 73.0a1 (Build ID: 20191203094830)

[Affected Platforms]:

  • Mac 10.14
  • Windows 10 x64
  • Ubuntu 16.04 x64

[Prerequisites]:

  • Have the latest Nightly installed.
  • Have the “devtools.chrome.enabled” pref set to “true”.
  • Run the “(async function() { let { ProfileAge } = ChromeUtils.import("resource://gre/modules/ProfileAge.jsm"); let age = await ProfileAge(); age._times = { firstUse: 1368255600000, created: 1368255600000 }; await age.writeTimes(); })();” code on the browser console.
  • Have access to the stage delivery console.
  • Have an active branched add-on recipe.
  • Have the “security.content.signature.root_hash” pref set to "DB:74:CE:58:E4:F9:D0:9E:E0:42:36:BE:6C:C5:C4:F6:6A:E7:74:7D:C0:21:42:7A:03:BC:2F:57:0C:8B:9B:90".
  • Have the "app.normandy.api_url" pref set to "https://stage.normandy.nonprod.cloudops.mozgcp.net/api/v1".
  • Have the "app.normandy.dev_mode" pref set to “true”.
  • Have the "app.normandy.logging.level" pref set to “0”.
  • Have the "services.settings.server" pref set to "https://settings.stage.mozaws.net/v1".
  • Have the "xpinstall.signatures.dev-root" pref set to “true”.
  • Create a new pref named “carmentips” and set it as “true”.

[Steps to reproduce]:

  1. Open the Firefox browser with the profile from prerequisites.
  2. Open a new tab.
  3. Click anywhere on the tip except the “OK, Got It” button.
  4. Observe what happens next.

[Expected result]:

  • Nothing happens. The tip is not dismissed.

[Actual result]:

  • The tip is dismissed.

[ Notes]:

  • This issue is reproducible with both “Onboarding” and “Redirect” tips .
  • Attached a screen recording with the issue.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 73.1 - Dec 2 - Dec 15
Points: --- → 2
Priority: -- → P1

A couple of problems:

  • pickElement gets the tip's URL (from UrlbarUtils.getUrlFromResult). As long as the picked element isn't the help button, we go ahead and use that URL even if the element is not the main button.
  • Even after fixing the previous problem, _on_mousedown will "select" the tip row itself (not its buttons). If the tip button is already selected (because it's the heuristic for example), the selection goes away at that point.

So both pickElement and _on_mousedown should ignore tip elements that aren't the buttons. I considered adding a canElementBePicked method, but it ended up being very similar to getResultFromElement, which pickElement already calls first thing anyway. So I modified getResultFromElement to return null for non-button tip elements. getResultFromElement is called only twice -- aside from here in pickElement, in handleCommand, where the element is always the selected element. So modifying getResultFromElement in this way should be fine. (And tests pass.)

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1b6d5f51728 Ignore clicks within tip results outside the buttons. r=harry
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73

Comment on attachment 9113371 [details]
Bug 1600953 - Ignore clicks within tip results outside the buttons.

Beta/Release Uplift Approval Request

  • User impact if declined: We need this in order to run the urlbar nudges and interventions experiments (bug 1568594, bug 1564506) on 72 as planned.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This patch is small and is intended to affect only urlbar "tip" results, which are not normally shown and will currently be shown only in experiments. The modified code path is used by all results in the urlbar, however, so the risk isn't zero. But this comes with a test, and the urlbar is well tested, and we have QA coverage specifically for this due to the experiments.
  • String changes made/needed:
Attachment #9113371 - Flags: approval-mozilla-beta?

Comment on attachment 9113371 [details]
Bug 1600953 - Ignore clicks within tip results outside the buttons.

urlbar fix for experiments, approved for 72.0b3

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

I have verified this issue and is no longer reproducible on the latest Nightly 73.0a1 (Build ID: 20191205094649) on Windows 10 x64, Mac 10.14, Ubuntu 16.04 x64.

  • The tip remains displayed after clicking anywhere inside the tip (except the "OK, Got It" button).

Hello Simona,

Will you also cover this issue in 72.0b3?

Flags: needinfo?(simona.rosu)

I have verified this issue and is no longer reproducible on the Firefox Beta 72.0b3 Unbranded build (Build ID: 20191205201734) on Windows 10 x64, Mac 10.14, Ubuntu 16.04 x64.

  • The tip remains displayed after clicking anywhere inside the tip (except the "OK, Got It" button).
Status: RESOLVED → VERIFIED
Flags: needinfo?(simona.rosu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: