You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using Chosen in our application and using Jasmine to test the integration with the rest of our JavaScript. We're trying to keep as much of our JavaScript independent of the DOM as possible, which we ensure by testing it while detached, but we've run into a few cases where Chosen expects it to be in the DOM.
Another example is trying to click the "close" button on a multi-select choice. The lookup and subsequent click event bind rely on the button being in the DOM. To fix it, we had to modify line 596 of chosen.jquery.js (v0.9.5) from this:
link = $('#' + choice_id).find("a").first();
to this:
link = this.container.find('#' + choice_id).find("a").first();
It would seem that the general solution to these issues is to switch, whenever possible, from this:
$('...')
to this:
this.container.find('...')
The text was updated successfully, but these errors were encountered:
We're using Chosen in our application and using Jasmine to test the integration with the rest of our JavaScript. We're trying to keep as much of our JavaScript independent of the DOM as possible, which we ensure by testing it while detached, but we've run into a few cases where Chosen expects it to be in the DOM.
One such example is issue #358.
Another example is trying to click the "close" button on a multi-select choice. The lookup and subsequent click event bind rely on the button being in the DOM. To fix it, we had to modify line 596 of
chosen.jquery.js
(v0.9.5) from this:to this:
It would seem that the general solution to these issues is to switch, whenever possible, from this:
to this:
The text was updated successfully, but these errors were encountered: