> 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 text and prompt alignment issue

-------------

Changes:
  - all: https://git.openjdk.org/jfx/pull/980/files
  - new: https://git.openjdk.org/jfx/pull/980/files/622cac30..8cf9fd71

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=980&range=04
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=980&range=03-04

  Stats: 42 lines in 2 files changed: 25 ins; 7 del; 10 mod
  Patch: https://git.openjdk.org/jfx/pull/980.diff
  Fetch: git fetch https://git.openjdk.org/jfx pull/980/head:pull/980

PR: https://git.openjdk.org/jfx/pull/980

Reply via email to