Skip to content

Conversation

@Leonabcd123
Copy link
Contributor

Description

Remove until the last character instead of the last 3 characters.

Closes #7149

@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Nov 26, 2025
@Leonabcd123
Copy link
Contributor Author

The problem was that we sliced until the length of the charOverride value (3 periods), instead of the key (which is the one inputted).

@Miodec Miodec closed this in f63972a Nov 26, 2025
@Miodec
Copy link
Member

Miodec commented Nov 26, 2025

Not exactly the right fix. The input value replace must replace the same amount of characters as the length of the data. The issue was that it the charOverride check didnt replace the value of the input element.

@Leonabcd123 Leonabcd123 deleted the fix-char-overrides branch November 26, 2025 17:00
@Miodec
Copy link
Member

Miodec commented Nov 26, 2025

Shouldn't it just remove the last character in the current input (which will always have the key of the charOverride as the last char)?

It won't always have the key of the charOverride. Sometimes it might receive data thats longer than 1 character (for example from composition) without triggering charOverride.

Why do we need to add the replacement? Isn't it being done when emulating the keypresses?

The dom value and the incoming data property must be in sync.

@Leonabcd123
Copy link
Contributor Author

Oh, I was under the impression that we only pass chars with the length of 1 to OnInsertText unless it's in charOverride. Thanks for the explanation!

Miodec added a commit that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"…" character is not input correctly anymore

3 participants