Giter Club home page Giter Club logo

Comments (21)

seanwash avatar seanwash commented on July 18, 2024

Hello @djrees,

I'm trying to replicate the issue that you're having and I haven't had any luck. Can you explain a little more about the problem you're running into, or setup a jsfiddle to demonstrate the issue? Maybe even a screenshot / screencast would be great!

from fancyselect.

djrees avatar djrees commented on July 18, 2024

Hey @seanwash - I've setup a codepen that shows this in action.

from fancyselect.

seanwash avatar seanwash commented on July 18, 2024

Hey @djrees, are you referring to trying to grab the scroll bar with the mouse and drag the scroll bar itself up and down vs. using a trackpad or mouse wheel?

from fancyselect.

djrees avatar djrees commented on July 18, 2024

Yes, sorry - I should have been more explicit.

Clicking the scroll bar to trying to drag it up or down causes the .options ul to hide.

from fancyselect.

d34dman avatar d34dman commented on July 18, 2024

Yes, i can confirm the bug. When clicking on "scrollbar" of the in a long option list, it hides the option list as if you clicked somewhere outside.

from fancyselect.

zoerooney avatar zoerooney commented on July 18, 2024

Noticing this, too. Any thoughts on a fix, anyone?

from fancyselect.

paulstraw avatar paulstraw commented on July 18, 2024

I've got something in the works, just haven't had a chance to finish it up yet. Stay tuned!

from fancyselect.

rawksteady avatar rawksteady commented on July 18, 2024

I've noticed that it works just fine until you actually scroll the page. If you haven't scrolled when touching the scollbars inside the dropdown it works just fine. As soon as you have scrolled anywhere, no matter how little, it breaks. Hope this helps.

from fancyselect.

MarcusSublime avatar MarcusSublime commented on July 18, 2024

I can also confirm this bug and I'm really looking forward to a fix. I tried some workarounds but concluded the bug was to heavy to be easily fixed

from fancyselect.

d34dman avatar d34dman commented on July 18, 2024

@rawksteady , i am able to reproduce the error without scrolling anywhere else. Tested it on google chrome.

from fancyselect.

br2br avatar br2br commented on July 18, 2024

The problem is with Blur event. It fires when you trying to click on scrollbar, because select input loosing focus.

Quick solution:

  1. var isiOS, settings; CHANGE TO: var isiOS, settings, clicked = false;
trigger.on('close', function() {
    trigger.removeClass('open');
    return options.removeClass('open');
});

CHANGE TO:

trigger.on('close', function() {
    var parent = sel.parent();
    if(!parent.is(':hover') || (parent.is(':hover') && clicked)) {
        clicked = false;
        trigger.removeClass('open');
        return options.removeClass('open');
    }
});
sel.parent().on('mouseout', function() {
    sel.trigger('focus');
});
options.on('click', 'li', function(e) {
    options.find('.selected').removeClass('selected');
    $(e.currentTarget).addClass('selected');
    return sel.val($(this).data('value')).trigger('change').trigger('blur').trigger('focus');
});

CHANGE TO:

options.on('click', 'li', function(e) {
    options.find('.selected').removeClass('selected');
    $(e.currentTarget).addClass('selected');
    clicked = true; 
    return sel.val($(this).data('value')).trigger('change').trigger('blur').trigger('focus');
});

from fancyselect.

paulstraw avatar paulstraw commented on July 18, 2024

@br2br IIRC, something similar to this method caused a bunch of Android problems. If you can submit a pull request with the changes in the coffee file, I can take a look though.

EDIT: Also, dude. You can use ``` code fences to get highlighting and formatting. I updated your comment for you.

from fancyselect.

br2br avatar br2br commented on July 18, 2024

Sorry, but I'm not using github and don't know how to pull request.

P.S. thanks for formating!

from fancyselect.

rawksteady avatar rawksteady commented on July 18, 2024

@br2br Thank you for the snippets, will work for me nicely until this is properly fixed!

from fancyselect.

0vidiu avatar 0vidiu commented on July 18, 2024

Thanks for the solution! It saved me a lot of time, rather than trying to figure things out for myself.

from fancyselect.

typoworx-de avatar typoworx-de commented on July 18, 2024

Hello,

has the updated code above seeming to solve the scrollbar-issue been pushed to the GIT version yet?

from fancyselect.

markadrake avatar markadrake commented on July 18, 2024

I can confirm that I too have this issue - a scrollbar appears for the dropdown list, and using the mousewheel I can scroll to the correct option. However, using the scrollbar by clicking on it causes the dropdown menu to disappear. Ths is in the latest stable release of Google Chrome on Windows 7.

from fancyselect.

rdourado avatar rdourado commented on July 18, 2024

This is not fixed yet, right?

from fancyselect.

rdourado avatar rdourado commented on July 18, 2024

I fixed like this, but I don't know if it's a good solution:

options.on 'scroll', ->
    trigger.addClass 'open'
    options.addClass 'open'
    sel.focus()

from fancyselect.

andreas-stricker avatar andreas-stricker commented on July 18, 2024

i have tried the updated fancySelect.js
The click on the scrollbar works, but if the user clicks outside the selectbox, the options stay opened.
so on a page with 3 selectboxes and you click all three they all stay opened. how to solve this?

from fancyselect.

vdecree avatar vdecree commented on July 18, 2024

@strigga See: #37 - This worked for me, using the updated script file and changing the line as @LuisMata mentions. I can now use multiple fancy selects on a single page and only one will open at any one time. Addtionally the scrolling issue is fixed (or so it seems from testing so far)

from fancyselect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.