FancySelect icon indicating copy to clipboard operation
FancySelect copied to clipboard

Option doesn't always change on click

Open dahliacreative opened this issue 10 years ago • 12 comments

Hey Guys I'm having an issue where sometimes when you click to change an option nothing happens and you have to click the option 3 times to get it to change.

I'm half way through a massive project and I've only just noticed this.

Any ideas what it could be??

dahliacreative avatar Apr 02 '14 08:04 dahliacreative

Ok so it seems if your click takes too long, the event doesn't fire, but if you do a quick click then it does. I don't know if this is intentional, but seems like a bug to me. Obviously I click slowly.

dahliacreative avatar Apr 02 '14 09:04 dahliacreative

Ok I figured it it's because you're triggering close.fs whenever the select is blurred.

So I removed the blur event on the select then in the options.click.fs event just triggered close.fs and that seemed to fix it.

Need to make sure it works on iOS but it works much better for me on desktop now, is there a reason you guys did it that way? I'm just thinking about old users who might make longer clicks like my dad!

If there is no major breakage after changing it, I'll submit a pull request. Cheers.

EDIT: Just realised why you've done this, so if you click off without selecting an option. Hmmm. Frustrating!

dahliacreative avatar Apr 02 '14 09:04 dahliacreative

Ok I got round it with a mouseenter/mouseleave function on the options to set a isHovered var which I check when the sel is blurred. Does the trick.

dahliacreative avatar Apr 02 '14 09:04 dahliacreative

Has the fix been implemented? I'm noticing it still on my application of it. No change on click.

justiny avatar Apr 20 '14 17:04 justiny

I just implemented my own fix, along with some others, I'll commit it to my for and submit a pull request.

dahliacreative avatar Apr 22 '14 07:04 dahliacreative

That would be really helpful, thanks.

justiny avatar Apr 25 '14 04:04 justiny

I've submitted a pull request, although it doesn't seem like anyone is working on it as the last pull requests were from 3 months ago.

FYI In my pull request I also re-ordered the elements in the fancy-select div so the select now comes last which fixes the positioning of validation messages if you are using something like parsley.js

dahliacreative avatar Apr 25 '14 08:04 dahliacreative

We're here. Sorry about the delays, things have been very busy on our end. Have you tested your fix on iOS/Android?

paulstraw avatar Apr 25 '14 08:04 paulstraw

I've tested on iOS, but not android as I don't have anything to test it on :(

dahliacreative avatar Apr 25 '14 09:04 dahliacreative

I was having the same problem, pull request from @sjoudry fixed it for me. Thanks

smercadomx avatar Aug 17 '14 00:08 smercadomx

+1

hbi99 avatar May 07 '15 09:05 hbi99

Thank you a lot, it works)

Kirill380 avatar Jun 30 '15 14:06 Kirill380