Closed Bug 1313067 Opened 7 years ago Closed 7 years ago

Text is more truncated with ellipsis in datalist for input

Categories

(Toolkit :: Autocomplete, defect, P1)

52 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox49 --- unaffected
firefox50 --- unaffected
firefox51 --- unaffected
firefox52 --- fixed

People

(Reporter: over68, Assigned: mconley)

References

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce:

1. Go to https://dl.dropboxusercontent.com/u/95157096/85f61cf7/phacpjwi7i.html.
2. Click on the <input> element to open.


Actual results:

Text is more truncated with ellipsis in datalist for input.

Screenshot https://dl.dropboxusercontent.com/u/95157096/85f61cf7/fe9mwb3fst.png
Flags: needinfo?(mconley)
Attached file Test case
Thanks. It looks like the richlist autocomplete binding has some hard-coded extra padding at the end of each richlistitem.

I'll make that opt-in on the binding.
Flags: needinfo?(mconley)
Assignee: nobody → mconley
Attachment #8805602 - Flags: review?(MattN+bmo) → review?(mak77)
Comment on attachment 8805602 [details]
Bug 1313067 - Make extra padding in autocomplete popup richlistitem opt-in.

https://reviewboard.mozilla.org/r/89354/#review90090

::: browser/base/content/browser.xul:156
(Diff revision 1)
>             id="PopupAutoCompleteRichResult"
>             noautofocus="true"
>             hidden="true"
>             flip="none"
> -           level="parent"/>
> +           level="parent"
> +           extrapadding="true" />

ah, I didn't remember of this, my memory gets rusty.

What about naming this overflowpadding and making it a numeric value rather than a boolean, so:
overflowpadding="30"

::: toolkit/content/widgets/autocomplete.xml:1411
(Diff revision 1)
>            ]]>
>          </setter>
>        </property>
>  
> +      <property name="useExtraPadding"
> +                onget="return this.getAttribute('extrapadding') == 'true';"

and here you could return 0 as the default value, so below you can just use popup.overflowPadding in the calculation and avoid assigning to a pointless extraPadding temp var.

using Number(...getAttribute()) may do the trick (empty string is handled as 0).
Attachment #8805602 - Flags: review?(mak77)
Comment on attachment 8805602 [details]
Bug 1313067 - Make extra padding in autocomplete popup richlistitem opt-in.

https://reviewboard.mozilla.org/r/89354/#review90144
Attachment #8805602 - Flags: review?(mak77) → review+
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b30232f430a
Make extra padding in autocomplete popup richlistitem opt-in. r=mak
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/4b30232f430a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.