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

Autocomplete showsuggestions event provide inconsistent input value #308

Open
mems opened this issue Jul 18, 2023 · 1 comment
Open

Autocomplete showsuggestions event provide inconsistent input value #308

mems opened this issue Jul 18, 2023 · 1 comment

Comments

@mems
Copy link

mems commented Jul 18, 2023

Expected Behavior

Logs (lower cased and trimmed):

""
" "
"te"
"test"
"test"
"test"

or (untouched):

""
" "
" TE"
" TEST"
" TEST "
" TEST "

Actual Behavior

Logs:

""
" "
"te"
"test"
"test"
" TEST "

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. visit the playground (see below)
  2. focus the autocomplete field
  3. enter TEST (with surounding spaces)
  4. open browser devtools console

Browser name/version/os (ie Chrome Version 62.0.3202.94 (Official Build) (64-bit) MacOS)

  • Chrome 115.0.5790.56 64-bit Windows 10
  • Firefox 116.0b3 Windows 10

Coral Spectrum version

4.15.20

Sample Code that illustrates the problem (use the Playground if possible)

Playground example

Screenshots (if applicable)

N/A

@mems
Copy link
Author

mems commented Jul 18, 2023

The problem come from the different handling of inputValue:

Note that the string comparaison don't unicode equivalences. Example: "señor" !== "señor" (cf. String.prototype.normalize() - JavaScript | MDN)

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

No branches or pull requests

1 participant