Closed Bug 1377319 Opened 7 years ago Closed 7 years ago

Tooltip position is wrong when searching "14"

Categories

(Firefox :: Settings UI, defect, P1)

56 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed
firefox57 --- verified

People

(Reporter: rickychien, Assigned: rickychien)

References

(Blocks 1 open bug)

Details

(Whiteboard: [photon-preference])

Attachments

(2 files)

Attached image search14.png
As attachment, tooltip position is wrong when searching "14". This is a regression since bug 1374230 modified the tooltip creation function in order to support window resize.
I introduced a `tooltipNode` property to keep tracking the reference of tooltip node for each anchor node. Mike, can you have a look at this quick fix? Thanks
Whiteboard: [photon-preference][triage] → [photon-preference]
Update patch including two additional issues fix:

* Searching "tra" should see two tooltips position on two button separately. (tooltip position is wrong in vbox)
* Set cursor: default;
Comment on attachment 8882412 [details]
Bug 1377319 - Reference to the right tooltip element to correct position

https://reviewboard.mozilla.org/r/153532/#review159142

::: browser/themes/shared/incontentprefs/preferences.inc.css:628
(Diff revision 4)
>    position: absolute;
>    padding: 0 10px;
> -  bottom: 100%;
>    background-color: #ffe900;
>    border: 1px solid #d7b600;
> +  cursor: default;

This should be `-moz-user-select: none;` instead of `cursor: default;`. Using cursor:default will make the mouse cursor look like the text can't be selected, but it still will allow selection. -moz-user-select:none will prevent the text from being selected and also change the cursor.

::: browser/themes/shared/incontentprefs/preferences.inc.css:633
(Diff revision 4)
> +  cursor: default;
>  }
>  
>  .search-tooltip:hover,
>  .search-tooltip:hover::before {
>    filter: opacity(10%);

While you are here please change this to `opacity:.1;`. `filter` is more expensive than `opacity` and these will accomplish the same thing.
Attachment #8882412 - Flags: review?(jaws) → review+
Comment on attachment 8882412 [details]
Bug 1377319 - Reference to the right tooltip element to correct position

https://reviewboard.mozilla.org/r/153532/#review159150

::: browser/components/preferences/in-content-new/subdialogs.js:342
(Diff revision 4)
>      // Search within main document and highlight matched keyword.
>      gSearchResultsPane.searchWithinNode(this._titleElement, gSearchResultsPane.query);
>  
>      // Search within sub-dialog document and highlight matched keyword.
>      let subDialogsChildren = this._frame.contentDocument
>        .querySelectorAll(":scope > *:not([data-hidden-from-search])");

Please file a bug to remove :scope psuedo-class from preferences. See https://bugzilla.mozilla.org/show_bug.cgi?id=1345702 where support for <style scoped> will be removed.
Comment on attachment 8882412 [details]
Bug 1377319 - Reference to the right tooltip element to correct position

https://reviewboard.mozilla.org/r/153532/#review159150

> Please file a bug to remove :scope psuedo-class from preferences. See https://bugzilla.mozilla.org/show_bug.cgi?id=1345702 where support for <style scoped> will be removed.

:scope has been removed within this patch update.
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e04130206380
Reference to the right tooltip element to correct position r=jaws
https://hg.mozilla.org/mozilla-central/rev/e04130206380
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
I have reproduced this bug with nightly 56.0a1 (2017-06-29) on "Linux Mint (64 Bit).

The bug's fix is now verified on Latest Nightly 56.0a1

Build ID 	20170705100248
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

[Bugday-20170705]
I have successfully reproduced this bug with Nightly 56.0a1 (2017-06-29) (32-bit) on windows 10(32bit)

this bug is verified fix with  latest nightly 56.0a1 (2017-07-05) (32-bit)

Build ID: 20170705030206
Mozilla/5.0 (Windows NT 10.0; rv:56.0) Gecko/20100101 Firefox/56.0
QA Whiteboard: [Bugday-20170705]
Build ID: 20170808114032
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

Verified as fixed on Firefox Nightly 57.0a1 on Windows 10 x 64, Mac OS X 10.12 and Ubuntu 16.04 x64.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: