Coder Social home page Coder Social logo

Comments (12)

owldesign avatar owldesign commented on June 7, 2024

anyone had this happen? any fixes?

from dropkick.

nolfranklin avatar nolfranklin commented on June 7, 2024

Yup. Still waiting for a fix as well.

from dropkick.

lae-mtl avatar lae-mtl commented on June 7, 2024

Try this, it worked for me !

$(document).click(function(){
$('.dk_open').removeClass('dk_open');
});

$('.dk_open').live('click',function(e){
e.stopPropagation();
});

from dropkick.

reactivo avatar reactivo commented on June 7, 2024

I'm having this issue as well and the suggestion made above didn't work. Any ideas?

from dropkick.

garposmack avatar garposmack commented on June 7, 2024

You could add this line in the "live" "click" event of .dk_toggle.
Line 363, or look for: // Handle click events on the dropdown toggler.
Add this: $('.dk_open').removeClass('dk_open'); .

The final method should be like this:

// Handle click events on the dropdown toggler
$('.dk_toggle').live('click', function (e) {
    $('.dk_open').removeClass('dk_open');

  var $dk  = $(this).parents('.dk_container').first();

  _openDropdown($dk);

  if ("ontouchstart" in window) {
    $dk.addClass('dk_touch');
    $dk.find('.dk_options_inner').addClass('scrollable vertical');
  }

  e.preventDefault();
  return false;
});

from dropkick.

ekdesign avatar ekdesign commented on June 7, 2024

Hey there,

did you notice that in chrome, when setting max-height in CSS doesn't open scrolling but in FF and IE it does.

Someone noticed that and fixed it maybe?

10x,
EK

from dropkick.

ChayaCooper avatar ChayaCooper commented on June 7, 2024

lae-mtl's suggestions didn't work for me either, but garposmack's fix worked perfectly. Thank you so much!

I think this is definitely worth submitting as a pull request :-)

from dropkick.

snig-b avatar snig-b commented on June 7, 2024

A combination of garposmak's and lae-mtl's fixes worked for me---

$(document).click(function(){
    $('.dk_open').removeClass('dk_open');
});
$(document).on('click','.dk_open',function (e) {
    e.stopPropagation();
});
$(document).on('click','.dk_toggle',function (e) {

    var $dk  = $(this).parents('.dk_container').first();

    if ( $.browser.webkit ){
        $('.dk_open').removeClass('dk_open');
            $dk.toggleClass('dk_open');
    }
    return false;
});

I added this code outside the library in my own code.
Thank you :)

from dropkick.

rayiezhf avatar rayiezhf commented on June 7, 2024

I had the same problem and a friend of mine discovered that if you add "tabindex" attribute to the "select" tag dropkick will behave properly.

This won't work:

<select name="test">
<option val="1">a</option>
</select>

This will work:

<select name="test" tabindex="1">
<option val="1">a</option>
</select>

from dropkick.

snig-b avatar snig-b commented on June 7, 2024

Although this will work.. but it will behave inconsistently if there are more than 1 element with the same tabindex in a page.
So using tabindices is an option only if you are sure there's not going to be another element with the same tab index on the page.

from dropkick.

lukechapman avatar lukechapman commented on June 7, 2024

Find:

_closeDropdown($('.dk_toggle').parents(".dk_container").first());

Replace with:

 _closeDropdown($('.dk_open'));

(Should be around the bottom, line 427 as of version 1.0.3)

from dropkick.

captbaritone avatar captbaritone commented on June 7, 2024

I ended up using @snig-b's fix which seems to work. I can also add, that it must have something to do with the tab index as @rayiezhf mentioned because the last dropdown on a page seems to function correctly.

from dropkick.

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.