You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have upgraded QUnit to 2.18.1 and something is not right with the module search box. I'm not able to select multiple modules by performing several searches. This worked well in previous versions (not sure which ones though, I've noticed this issue some time ago).
Tell us about your runtime:
QUnit version: 2.18.1
Which environment are you using? (e.g., browser, Node): Chrome, Firefox on Mac
How are you running QUnit? (e.g., QUnit CLI, Grunt, Karma, manually in browser): manually in browser
What are you trying to do?
I've created a simple test scenario to isolate this problem:
When I search and then select a module, I expect it to be appended to the list of selected modules,
When I leave the search bar empty, I expect it to show the names of the selected modules
What actually happened?
Searching always resets current selection. There is no way of selecting both add and subtract by searching for them individually (I ended up using browser search functionality),
Sometimes module names listed in the search bar get out of sync with checkboxes shown below.
The text was updated successfully, but these errors were encountered:
This is specific to when using the input field to limit the suggestions, and then removing the input to type something different for adding another. Ticking multiple boxes without typing, or from the same typeahead, does work still.
In the main branch, the failure makes sense to me now. Basically it goes like this:
In html.js, upon typeahead, we use fuzzysearch to narrow down the list of modules, and then re-render the dropdown HTML by calling moduleListHtml(). This has the notable side-effect of destroying the live DOM for the dropdown, including the live state of checkboxes. This creates a secondary bug that I hadn't noticed before as well. Which is that when you type "foo" and tick "foobar", as soon as you remove or add any character, the "foobar" already becomes unchecked. It's not lost when you click the second one, it's lost immediately.
In html.js, inside moduleListHtml(), only the original config.moduleId state is considered, eg. from when the page was loaded. This means the state isn't preserved or recoverable from here either.
In html.js, upon pressing the apply button we enter interceptNavigation, which iterates the current checkboxes in the dropdown and serialises the moduleId parameter for the reload.
In 2.10.1 and earlier, the typeahead handler is much more primitive. We didn't have fuzzysearch yet. Instead, we simply iterated the checkboxes and toggled display: none for entries that don't match. This meant the checkbox state was preserved. The regression traces to #1440, which is the addition of fuzzysearch.
I have upgraded QUnit to 2.18.1 and something is not right with the module search box. I'm not able to select multiple modules by performing several searches. This worked well in previous versions (not sure which ones though, I've noticed this issue some time ago).
Tell us about your runtime:
What are you trying to do?
I've created a simple test scenario to isolate this problem:
Then I tested selecting and searching modules:
What did you expect to happen?
What actually happened?
The text was updated successfully, but these errors were encountered: