Closed Bug 1484979 Opened Last year Closed Last year
completion text is not displayed if the input overflows
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P1
The off-by-1px issue will be resolved in Bug 1479750. Let's re-purpose this bug to make sure the completionText is always displayed like it should.
Summary: completion text is off by 1px in old JsTerm → completion text is not displayed if the input overflows
The completion node was wrongly positionned as soon as the input overflowed. We fix this by setting the completionNode height in resizeInput, like we do for the inputNode. The inputNode takes the whole remaining vertical space when starting the console. But when typing, the height is computed and set according to what's in the input. Which means the input wasn't taking the remaining space anymore, which could be weird (e.g. if the user wants to select some text by starting dragging below the actual input, although the UI would indicate it is possible). The autocompletionPopup was a bit off due to 2 things: - in the function that was returning the chevronWidth, we were substracting the autocomplete popup padding. But the autocomplete popup already handles that itself. - in the function that was computing the character width, we were using offsetWidth which returned a rounded value. This means that the further the autocompletion was displayed at, the more the popup would be off. We use getBoundingClientRect().width instead which gives us a decimal value. And we also make sure to not alter the scrolling position in the inputNode when accepting an autocompletion result (a test is added).
Comment on attachment 9004460 [details] Bug 1484979 - Fix old-jsterm UI glitches; r=bgrins. Brian Grinstead [:bgrins] has approved the revision.
Attachment #9004460 - Flags: review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/609e1efc1f9f Fix old-jsterm UI glitches; r=bgrins.
You need to log in before you can comment on or make changes to this bug.