Comments (12)
anyone had this happen? any fixes?
from dropkick.
Yup. Still waiting for a fix as well.
from dropkick.
Try this, it worked for me !
$(document).click(function(){
$('.dk_open').removeClass('dk_open');
});
$('.dk_open').live('click',function(e){
e.stopPropagation();
});
from dropkick.
I'm having this issue as well and the suggestion made above didn't work. Any ideas?
from dropkick.
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.
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.
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.
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.
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.
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.
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.
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)
- IE11 Issue: Change event. HOT 2
- Disabled state isn't relayed to the screen reader
- Multiselects on mobile are broken
- Disabled optgroup not detected
- Classes added to the combobox are removed on select HOT 4
- Select with all options disabled breaks HOT 1
- JAWS 17 not reading dropkick dropdown
- this object doesn't support this property or method dropkick HOT 1
- How to handle autocomplete
- This isn't really an issue, but HOT 1
- UglifyJS error because of ES6 HOT 8
- Not working on IE 11 HOT 2
- TypeError default is not a constructor HOT 5
- Cross-Origin blocking on forms using dropkick HOT 1
- Using an icon font displays unexpected results HOT 12
- toggleClass throws "is not a function" HOT 2
- Hiding the Selected Option From the Dropdown List HOT 7
- Bubble Option not triggering change on the native select HOT 1
- Accessibility issue HOT 1
- Dropkick does not correctly handle selects with optgroups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropkick.