question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

In KTextbox, Deleting a character jumps cursor to end of text field

See original GitHub issue

String is being trimmed too aggressively, likely due to our use of v-model.trim.

Observed behavior

In any k-input, deleting a single bookending letter automatically throws the cursor to the next word.

Expected behavior

Deleting a single letter only deletes that letter, Not the space before or after it.

User-facing consequences

Unexpected naming/renaming. Frustration.

Steps to reproduce

  1. Find an input outside of exercises. E.g. New/Edit Group/User/Class/etc.
  2. Type out a string that includes a single letter. E.g. “David C”, “A Man”, “T Roosevelt”
  3. Delete the single letter via Backspace/delete

Demo

Context

Kolibri 0.11 Ubuntu LTR 16xx Chromium 66

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jonboisercommented, Mar 4, 2019

I think we should probably get rid of the .trim we us on KeenUITextbox, and just delegate this cleanup step to the forms that require it.

Arguably, this trimming/cleaning shouldn’t be used in the majority of cases, maybe only on usernames. With everything else, we should allow trailing spaces

0reactions
jonboisercommented, Apr 1, 2019

v-model.trim was removed from KTextbox in #5241

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cursor is jumping to end position on deletion if character from ...
The cursor is jumping to end position on deletion of character on any position of the input field using mask library. The code...
Read more >
cursor jumps to start of text field as character is inserted
When the cursor starts at the beginning of the field, it looks like a right-to-left entry.
Read more >
Cursor jumps to end of text when editing item — oracle-tech
I am using a Javascript function, toUpperCase() to convert data input in a text field. However, when users would like to change a...
Read more >
Change Log - /inputs - Kendo UI for Angular - Telerik
Learn what changes we have made in our Angular /inputs package.
Read more >
Possible fix of cursor jumping at the end of the input field
Recently there was a discussion in Slack about this issue, which is a common problem unrelated to Elm. Browsers move the cursor to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found