Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconvenient InputText behavior with hint text and devices having touchscreen #5052

merged 1 commit into from Jun 1, 2019


None yet
2 participants
Copy link

commented Jun 1, 2019

Dear KOReader developers,

I want to ask you to consider below pull request about improving InputText widget behavior.

Because addChars() function did not consider if hint text is displayed or not, it could ignore the character input if the carat is not at the beginning of the hint text. If an user uses touchscreen device, he or she can place a carat at the middle of a text.

-- Before change

As in the example above, if I placed the carat in the middle of a hint text and clicked a key, that key was just ignored and the carat is moved to the beginning of text. Subsequent key click was processed because the carat is at the beginning of text.

I think that there are at least two solutions:

Make the widget tap handler function just moves the carat to the beginning of text if the widget is displaying a hint text, regardless of the position user had tapped.
🤔 It seemed somewhat complicated, for knowing if the hint text is displaying or not.

✔️ In the addChars() function, if the actual text (self.charlist) is empty, move the carat to the front then process remaining adding characters job.

-- After change

With the change, the keyboard type is handled without omission and regardless of carat position!

Please consider this request. Thank you.

@Frenzie Frenzie added bug UX labels Jun 1, 2019

@Frenzie Frenzie merged commit 98b681b into koreader:master Jun 1, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!

This comment has been minimized.

Copy link

commented Jun 1, 2019


@Frenzie Frenzie added this to the 2019.06 milestone Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.