Problem
When chosen is applied to the select boxes of tabledrag, tabledrag does not work anymore. In the backend of nodequeues this issue causes undesired removing of nodes from the nodequeue too.
Proposed resolution
Adding the selectors ".tabledrag-hide select, select.node-position" to the exclusion part of the jquery selector (on line 19) let it working again. The code of the selector would be:
$(selector, context)
.not('#field-ui-field-overview-form select, #field-ui-display-overview-form select, .wysiwyg, .tabledrag-hide select, select.node-position') //disable chosen on field ui
.each(function() {
Then I don't understand the following line of code:
var selector = settings.chosen.selector;
selector = selector + ', .tabledrag-hide select';
Why the tabledrag select boxes are added hardcoded to the selector?
Comments
Comment #1
rp7 commentedI can confirm this problem. Proposed fix works as well.
Comment #2
mhh commented.tabledrag-hide select, select.node-positiondidn't worked fo me, because those classes are added via javascript.Those selectors work for me:
for Drupal core draggable tables:
.draggable select[name$="[weight]"]and for nodequeue:
.draggable select[name$="[position]"]Comment #3
hydra commentedYou need to create patches out of the git reposetory of the module itself, otherwise the patch will not apply.
Anyway, the fix is working well for me, and I believe it's the right step in the right direction to clean up the messy chosen.js file.
Pushed to 7.x-2.x, thanks anyone getting this! http://drupalcode.org/project/chosen.git/commit/c48c8a6