Closed
Bug 1277207
Opened 10 years ago
Closed 9 years ago
HTML Tooltip arrow is mis-positioned when using RTL direction
Categories
(DevTools :: Framework, defect, P1)
DevTools
Framework
Tracking
(firefox49 unaffected, firefox50 verified)
| Tracking | Status | |
|---|---|---|
| firefox49 | --- | unaffected |
| firefox50 | --- | verified |
People
(Reporter: jdescottes, Assigned: bgrins)
References
Details
(Whiteboard: [devtools-html])
Attachments
(2 files)
The HTML Tooltip arrow is not correctly aligned with its anchor when using the RTL direction (tested with the forceRTL addon: https://addons.mozilla.org/en-US/firefox/addon/force-rtl/)
STRs:
- enable Tools "Force RTL direction"
- go to https://www.mozilla.org/en-US/
- open inspector
- hover an img tag in the markup view
- wait for the image preview tooltip to be displayed
ER: The tooltip arrow should be visible and should match the anchor
AR: The tooltip arrow is sometimes hidden, and when visible, it is not aligned with the tooltip's anchor
| Reporter | ||
Updated•10 years ago
|
Blocks: devtools-html-1
Whiteboard: [devtools-html]
Updated•10 years ago
|
Whiteboard: [devtools-html] → [devtools-html] [triage]
Updated•10 years ago
|
Priority: -- → P3
Whiteboard: [devtools-html] [triage] → [devtools-html]
Updated•9 years ago
|
Priority: P3 → P2
Updated•9 years ago
|
Flags: qe-verify?
Priority: P2 → P1
Updated•9 years ago
|
Flags: qe-verify? → qe-verify+
QA Contact: alexandra.lucinet
| Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/60336/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/60336/
Attachment #8764446 -
Flags: review?(jdescottes)
Updated•9 years ago
|
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Iteration: --- → 50.2
| Assignee | ||
Comment 3•9 years ago
|
||
I don't fully understand why this is needed, position:absolute flex children seem to behave a little oddly. I saw this post recently and wonder if it's related https://developers.google.com/web/updates/2016/06/absolute-positioned-children:
"A previous version of the CSS Flexible Box Layout specification set the static position of absolute-positioned children as though they were a 0x0 flex item. The latest version of the spec takes them fully out of flow and sets the static position based on align and justify properties. At the time of this writing, Edge and Opera 39 for desktop and Android already support this."
| Reporter | ||
Comment 4•9 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #3)
> I don't fully understand why this is needed, position:absolute flex children
> seem to behave a little oddly.
I think this is because by default items are aligned to "flex-start", which is the "right" edge in RTL. To position the arrow a "left" offset is applied on the element. In RTL, this just pushes the arrow further outside of the container. With your patch the arrow element is aligned to the left even in RTL, so using a left offset works.
Alternatively, we could align the tooltips to the right edge of the anchor in RTL and then we could offset the arrow element using margin-inline-start instead of left. (FWIW, today our XUL based tooltips are aligned to the left in LTR and RTL directions).
I think your solution is the best for now because of the low footprint, given that the HTML tooltip implementation is still changing.
| Reporter | ||
Comment 5•9 years ago
|
||
Comment on attachment 8764446 [details]
Bug 1277207 - Show tooltip arrow in rtl locales;
https://reviewboard.mozilla.org/r/60336/#review57212
Looks good to me, thanks!
::: devtools/client/themes/tooltips.css:163
(Diff revision 1)
> overflow: hidden;
> pointer-events: all;
> flex-shrink: 0;
> }
>
> +.tooltip-arrow:-moz-locale-dir(rtl) {
(if you agree with my analysis in my previous comment) we could add a comment here to explain this is to compensate for the fact that we position the arrow using "left" which does not respect the orientation.
Attachment #8764446 -
Flags: review?(jdescottes) → review+
| Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Julian Descottes [:jdescottes] from comment #5)
> Comment on attachment 8764446 [details]
> Bug 1277207 - Show tooltip arrow in rtl locales;
>
> https://reviewboard.mozilla.org/r/60336/#review57212
>
> Looks good to me, thanks!
>
> ::: devtools/client/themes/tooltips.css:163
> (Diff revision 1)
> > overflow: hidden;
> > pointer-events: all;
> > flex-shrink: 0;
> > }
> >
> > +.tooltip-arrow:-moz-locale-dir(rtl) {
>
> (if you agree with my analysis in my previous comment) we could add a
> comment here to explain this is to compensate for the fact that we position
> the arrow using "left" which does not respect the orientation.
Yeah, that sounds right. Added a comment in the patch
| Assignee | ||
Comment 7•9 years ago
|
||
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/b3a0f1a9ede7
Show tooltip arrow in rtl locales. r=jdescottes
Keywords: checkin-needed
Comment 9•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
| Reporter | ||
Comment 10•9 years ago
|
||
It turns out FF49 was not affected. The markup containing the arrow changed at the beginning of FF50, when migrating the event details tooltip. This made the RTL fix necessary.
Comment 11•9 years ago
|
||
Confirming that everything looks as intended with latest Nightly 50.0a1, across platforms [1]. Although, logged bug 1285540 - Windows specific and present only on RTL builds. Marking here accordingly.
[1] Windows 10 64-bit, Mac OS X 10.9.5, Ubuntu 14.04 x86
Updated•9 years ago
|
QA Whiteboard: [qe-dthtml]
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•