Closed Bug 1422711 Opened 7 years ago Closed 6 years ago

Autocomplete inline hint in jsterm can't handle wide character

Categories

(DevTools :: Console, defect, P3)

57 Branch
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: me, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171128222554

Steps to reproduce:

- open dev tool
- type "テスト"
- type .l to show autocomplete list


Actual results:

- inline hint incorrectly aligned


Expected results:

- inline hint properly aligned
Component: Untriaged → Developer Tools
Status: UNCONFIRMED → NEW
Component: Developer Tools → Developer Tools: Console
Ever confirmed: true
Summary: Autocomplete inline hint in developer tools can't handle wide character → Autocomplete inline hint in jsterm can't handle wide character
Looking again the box is misaligned as well. Probably the box and inline hint both use same alignment?
Rather than using (constant width * number of characters) we should look into measuring the exact text. I assume it was originally cached because of performance so we'll have to be mindful of that, but it doesn't seem like it should be too slow.
That made me thinking how about the other way (0-width characters). And yeah, just as guessed.

String: "ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​"

(taken from html regexp stackoverflow post)

I guess this applies to any characters that has different width even on "fixed width" font.
Product: Firefox → DevTools
This looks like it will be resolved by Bug 1473805.
Depends on: 1473805
Priority: -- → P3
The STR from Comment 0 and Comment 4 looks fine to me on 64.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: