RFR: 8178368: Right and Center alignment of text field works incorrectly [v2]
Karthik P K
kpk at openjdk.org
Thu Jan 5 08:17:58 UTC 2023
On Thu, 5 Jan 2023 08:00:11 GMT, Karthik P K <kpk at openjdk.org> wrote:
>> When Text width was more than TextField width, the logic to update `textTranslateX` in `updateCaretOff` method was causing the issue of unexpected behavior for Right and Center alignment.
>>
>> Made changes to update `textTranslateX` in `updateCaretOff` method only when text width is less than text field width i.e `delta` is positive.
>> For both right and center alignments, the `textTranslateX` value calculated in `updateTextPos` method will be updated without any condition so that expected behavior is achieved for all scenarios of text width relative to text field width.
>>
>> Added unit tests to validate LEFT, CENTER and RIGHT alignments. RIGHT and CENTER alignment tests are expected to fail without the fix provided in this PR.
>
> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix textfield right and center alignment issues
Fixed the issues with RIGHT and CENTER alignment of text field. Updated the details in bug and PR. Please review
-------------
PR: https://git.openjdk.org/jfx/pull/980
More information about the openjfx-dev
mailing list