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.

"Clicking" through options

See original GitHub issue

Hello, I’ve found some UI/UX bug in your awesome react-select (exactly reproduce for v1.1.0+).

  1. Select option in drop-down list
  2. If “behind” this option some button is exist, then for a short time it becomes :active. For more understanding look at gif

Thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mhxbecommented, Apr 12, 2018

What worked for me is playing with the z-index on .Select-menu-outer e.g.:

.Select-menu-outer {
  z-index: 5 !important;
}
2reactions
tiran133commented, Feb 10, 2018

I have the same issue. I solved it by overwriting the Options component there is where the issue lies.

https://github.com/JedWatson/react-select/blob/82910d9225f7aff73ac5052da9dc1e7f52f13de7/src/Option.js#L73

The select is handled on a mouse down event. Even though the event has a stopPropagation. The “button” underneath registers a mouse up event.

I simply copied the whole https://github.com/JedWatson/react-select/blob/82910d9225f7aff73ac5052da9dc1e7f52f13de7/src/Option.js Component created my own with an onMouseUp event instead of onMouseDown

...
<div className={className}
				style={option.style}
				role="option"
				aria-label={option.label}
				onMouseUp={this.handleMouseUp}
				onMouseEnter={this.handleMouseEnter}
				onMouseMove={this.handleMouseMove}
				onTouchStart={this.handleTouchStart}
				onTouchMove={this.handleTouchMove}
				onTouchEnd={this.handleTouchEnd}
				id={instancePrefix + '-option-' + optionIndex}
				title={option.title}>
				{this.props.children}
			</div>
...

In my main component I import the new Option component and give it the Select as a prop

<Select
....
              optionComponent={Option}
                    />
Read more comments on GitHub >

github_iconTop Results From Across the Web

Clicking through options in dropdown menus
Clicking through options in dropdown menus · 1. With an empty Select command, click on the dropdown menu to select it. · 2....
Read more >
How to click through options in a drop-down menu? - Octoparse
1) Click on the drop-down menu · 2) From the Action Panel, click "Loop through options in the dropdown" · 3) Switch to...
Read more >
Iterate through select options with button click - Stack Overflow
I have a select that contains % values (for zooming) and as well as having this as a dropdown I want to have...
Read more >
Options — Click Documentation (7.x)
A very useful feature of Click is the ability to accept parameters from environment variables in addition to regular parameters. This allows tools...
Read more >
click - Cypress Documentation
Options · Force a click regardless of its actionable state · Force a click with position argument · Force a click with relative...
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