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

Spelling suggestion truncates text instead of replacing incorrect word with suggestion. #594

Open
damcard opened this issue Jan 13, 2022 · 1 comment

Comments

@damcard
Copy link

damcard commented Jan 13, 2022

Describe the bug
When using IMask.js in a textarea with a regular expression mask, the spelling suggestion behavior the browser gives do not work. The result depends on the browser.

To Reproduce
Go to https://codepen.io/damcard/pen/QWqzpVr. In that example, if you paste the text 'the brown doog jumped over the lazy fox' into the textarea, the browser indicates the word 'doog' is misspelled.

Expected behavior
If you choose 'dog' or 'dogs' as the correction would be to produce the corrected value 'the brown dog jumped over the lazy fox' or 'the brown dogs jumped over the lazy fox' respectively.

Environment:
Depending on the browser (because the suggestion are different based on the browser) I see different results in Windows 10:
Results from Edge (97.0.1072.55 (Official build) (64-bit)): 'the brown dogs'
​Results from chrome (97.0.4692.71 (Official build) (64-bit)): 'the brown dogs'
Results from Firefox (95.0.2 (64-bit)): 'the brown dog'
IMask version 6.2.2
Vanilla Javascript/HTML

Additional context
You can cause it to fail in other ways. This is just the one I am focusing on for this ticket. Sometimes if you have two misspelled words or if you type after pasting it will fail differently.

@uNmAnNeR
Copy link
Owner

inside imask only input event is handled. I know there could be some issues with copy/paste, spelling etc. But as long as there is no proper way/standard i do not want to implement and support it. Rather I'd say I can't. Too much work, too low benefits, lot of edge cases in every browser. I gave it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants