question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent FilterComboBox whenClosed() result

See original GitHub issue

When toggling the filter combo box with the v icon, the previous result will simply be repeated. I would have expected it to be “no user interaction, return undefined”

Steps that reproduce the issue

  1. Use the following little script
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <title>Elix FilterComboBox</title>
    <script type="module" src="https://unpkg.com/elix@15.0.0/define/FilterComboBox.js"></script>
  </head>

  <body role="main">
    Open the dev tools.
	Type A and then click on the little v icon.
  
    <div class="demo padded">
      Fruit:
      <elix-filter-combo-box aria-label="Fruits" id="mySearchBox">
        <div>Acai</div>
        <div>Akee</div>
        <div>Apple</div>
        <div>Apricot</div>
        <div>Avocado</div>
      </elix-filter-combo-box>
    </div>
	
	<script>
		mySearchBox.addEventListener("open", (ev) => {
			ev.target.whenClosed().then(result => {console.log(result)});	
		});
	</script>
  </body>
</html>
  1. Type in some search text and interact with the component.
  2. Click on Apple.
  3. Click on the v icon a few times
  4. Open it and click outside of the component
  5. Click on the v icon a few times

Expected behavior I expected it to return undefined if I click on the v icon.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JanMiksovskycommented, Nov 13, 2021

Okay. I’ve gone ahead with a change to report { canceled: "toggle" } in this case.

0reactions
JanMiksovskycommented, Nov 13, 2021

This has now been released as Elix 15.0.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can cancelling DataGridViewCellValidatingEventArgs ...
e.Cancel is for stopping the validation when the input is deemed incorrect. This causes the cell to still have focus as the user...
Read more >
What's new version history - OSForensics
Issue was caused if previous instance of FSB was minimized when closed. Now if closed while minimized, FSB will not save existing dimensions...
Read more >
2012 v1 | WinForms Edition Release History | ComponentOne
Inconsistent behavior is no longer observed when Ordered List <ol> and Unordered List ... "Null Reference Exception" observed when closed the from contain ......
Read more >
Older Versions - Open Dental
Chart module, clicking a quick procedure would result in an error ... Edit Transaction, textbox and button tab order was inconsistent in simple...
Read more >
Change Log - Ant Design
Table filterDropdown add close in argument to close filter dropdown only. ... Fix unable to close modal when using visible in Modal.confirm().update ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found