Closed Bug 1263674 Opened 5 years ago Closed 5 years ago
Awesomebar popup truncates text incorrectly in RTL
58 bytes, text/x-review-board-request
It's truncated so that it's way too short because the truncation calculation uses a DOMRect.left -- not RTL-aware. Not sure how I did not notice this before when I tested RTL but I definitely did not.
Review commit: https://reviewboard.mozilla.org/r/45533/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/45533/
Attachment #8740064 - Flags: review?(mak77)
Comment on attachment 8740064 [details] MozReview Request: Bug 1263674 - Fix awesomebar popup truncation in RTL. r?mak https://reviewboard.mozilla.org/r/45533/#review42333 ::: toolkit/content/widgets/autocomplete.xml:2020 (Diff revision 1) > - // the listbox's padding on the left side. > + // visually balance out the listbox's padding on the left side. > + let dir = > + this.ownerDocument.defaultView.getComputedStyle(this).direction; > + let titleStart = dir == "rtl" ? itemRect.right - titleRect.right > + : titleRect.left - itemRect.left; > let extraPadding = 30; I'd move up the definition of extraPadding just after the comment, just to help readability a little bit.
Attachment #8740064 - Flags: review?(mak77) → review+
The text is correctly truncated across platform using the Arabic locale of Latest 48.0a2 DevEdition, buildID 20160503004116.
You need to log in before you can comment on or make changes to this bug.