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

Dropdown: Typing capital letters in an open noSearch dropdown does not focus a value #6069

Closed
s-werking opened this issue Jan 27, 2022 · 21 comments · Fixed by #6154
Closed

Comments

@s-werking
Copy link
Contributor

s-werking commented Jan 27, 2022

Describe the bug
Typing a capital letter to select a value works when the dropdown is closed, but not when the dropdown is open. This happens on dropdowns with the noSearch option set to true.

To Reproduce
Steps to reproduce the behavior:

  1. Go to http://localhost:4000/components/dropdown/example-no-search-lsf.html
  2. Click on the top dropdown to open it
  3. Type "T"
    Expected Result: "T - Thor" should be focused
    Actual Result: The blank option is focused

Expected behavior
When a capital letter is typed in an open dropdown with noSearch turned on, the corresponding option should receive focus just as it would when the lowercase letter is typed.

Version

  • ids-enterprise: v.4.60.0-dev

Platform

  • Infor Application/Team Name: lawson
  • OS Version: Windows10
  • Browser Name: chrome
  • Browser Version: Version 97.0.4692.99 (Official Build) (64-bit)
    Related Lawson JIRA Ticket: LSF-50656
@tmcconechy tmcconechy added [2] Velocity rating (Fibonacci) status: clarification Issue needs clarification type: bug 🐛 labels Jan 27, 2022
@tmcconechy
Copy link
Member

Seems like it just happens the first time...

@tmcconechy tmcconechy added team: lawson For lawson issues and removed status: clarification Issue needs clarification labels Jan 27, 2022
@tmcconechy tmcconechy added this to Triage in Enterprise (Next) Sprint Grooming via automation Jan 27, 2022
@awbuboltz
Copy link
Contributor

Note, this is the second occurrence of this issue: #4757

@tmcconechy
Copy link
Member

OK lets be sure to add a test to (who picks this up...)

@awbuboltz
Copy link
Contributor

Hey team, this issue is causing a large majority of our tests to fail and makes it difficult to use our product. Any chance of it getting looked at sooner than later?

@tmcconechy
Copy link
Member

Added to the sprint can you look when you can @ericangeles

@davidcarlsonberg
Copy link
Contributor

davidcarlsonberg commented Feb 18, 2022

Just attempted this on Windows10 Chrome and it worked as expected.
Steps below:

  • Visit master-enterprise.demo.design.infor.com/components/dropdown/example-no-search-lsf.html
  • Click on top dropdown arrow to open
  • Press Shift + T
  • Notice T - Thor is highlighted
    windows10chrome-dropdown

@tmcconechy
Copy link
Member

@davidcarlsonberg try it on https://main-enterprise.demo.design.infor.com/components/dropdown/example-no-search-lsf.html instead (master is old) or local

@tmcconechy
Copy link
Member

Once we figure this out will patch in a 4.60.1

@awbuboltz
Copy link
Contributor

@davidcarlsonberg, are you seeing it now on main-enterprise?

@davidcarlsonberg
Copy link
Contributor

davidcarlsonberg commented Feb 18, 2022

Yes, I can reproduce it now. It happens only the first time you click Shift + T on Windows10 Chrome after opening the No Search Dropdown.

@tmcconechy
Copy link
Member

Great - do you think you can fix this before the end of the month @davidcarlsonberg ?

@davidcarlsonberg
Copy link
Contributor

@tmcconechy I'll prioritize this over the weekend and have an update Monday.

@davidcarlsonberg
Copy link
Contributor

davidcarlsonberg commented Feb 28, 2022

Unfortunately, I'm unable to reproduce this using Browserstack. Can anyone else reproduce in that environment?

@s-werking
Copy link
Contributor Author

Hi @davidcarlsonberg,

I used Browserstack and was able to reproduce on all browsers. Did you use the correct URL?
https://main-enterprise.demo.design.infor.com/components/dropdown/example-no-search-lsf.html

@tmcconechy
Copy link
Member

Im not able to reproduce it either (never have) - but since the search is case insensitive anyways i wonder if this can be fixed by making both ends of the string lowerCase?

Do you have any suggestions for a fix @s-werking since you can see it clearly?

@davidcarlsonberg
Copy link
Contributor

Yes, @s-werking , using the URL (https://main-enterprise.demo.design.infor.com/components/dropdown/example-no-search-lsf.html) I am unable to reproduce on Browserstack (Windows10, Chrome 98).

@s-werking
Copy link
Contributor Author

It looks like this issue started happening after the noSearch dropdown input was disabled in: #5369

Without this line in dropdown.js, a capital letter is searched correctly, although a disabled search does make sense:
this.searchInput.prop('readonly', this.settings.noSearch);

The issue is that once it hits the line 1766 (self.highlightStartsWith(self.filterTerm);), self.filterTerm is the Shift key symbol and "t" when in branch 4.52.x self.filterTerm is just "t" for the case that "T" is entered in the dropdown search.

@s-werking
Copy link
Contributor Author

Okay I may have found a possible fix. Let me know what you think @davidcarlsonberg @tmcconechy .

Line 1629 - Add '&& !self.isControl(key)' to the conditional

@s-werking
Copy link
Contributor Author

of dropdown.js

@tmcconechy
Copy link
Member

Can you try to push that - and then we just test out everything else on a PR @davidcarlsonberg and assume it fixes?

@jbrcna
Copy link
Contributor

jbrcna commented Mar 4, 2022

this issue is now resolved. moving this ticket to done. thanks
verified in https://main-enterprise.demo.design.infor.com/components/dropdown/example-no-search-lsf.html
BS Win 10 chrome 97
Large GIF (956x494)

@jbrcna jbrcna moved this from Ready for QA (beta) to Done in Enterprise 4.61.x (Feb 2022) Sprint Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants