Open sheerun opened 4 years ago
This is a tricky one. The html input is hidden when substituted. A mousedown on the substituted pixi-text switches the visibility to the html input. however, for the cursor to be set correctly, the input would've had to be visible before that mousedown occured. i'll have check if it's possible to trigger a synthetic copy of that exact mousedown event on the html input, and if that will actually set the cursor position.
Maybe just show input at all times?
On Fri, Feb 7, 2020 at 3:24 PM Mwni notifications@github.com wrote:
This is a tricky one. The html input is hidden when substituted. A mousedown on the substituted pixi-text switches the visibility to the html input. however, for the cursor to be set correctly, the input would've had to be visible before that mousedown occured. i'll have check if it's possible to trigger a synthetic copy of that exact mousedown event on the html input, and if that will actually set the cursor position.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Mwni/PIXI.TextInput/issues/17?email_source=notifications&email_token=AACHMDIFC2CC3AG26FNMT2DRBVVLPA5CNFSM4KROQNUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELDCFRI#issuecomment-583410373, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACHMDKABTBOXASPVRJZZXDRBVVLPANCNFSM4KROQNUA .
Well if that's an option for you.
Set input.substituteText = false
Keep in mind placing things above it will not be possible with that setting.
Steps to reproduce:
Current behavior:
Text cursor is placed in original location, in the middle
Expected behavior:
Text cursor is placed where mouse cursor clicked
Here's git showing this behavior:
https://giphy.com/gifs/hosFDTCEf9Zhldlf7O