Skip to content

Commit a1b9fda

Browse files
authored
Prevent .selectize() updates from destroying .data() and event listeners (#3923)
Co-authored-by: cpsievert <[email protected]>
1 parent 97a12ec commit a1b9fda

File tree

9 files changed

+1226
-1230
lines changed

9 files changed

+1226
-1230
lines changed

inst/www/shared/selectize/js/selectize.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,14 +1064,8 @@ $.extend(Selectize.prototype, {
10641064
self.ignoreHover = self.settings.ignoreHover;
10651065
});
10661066

1067-
var inputPlaceholder = $('<div></div>');
1068-
var inputChildren = $input.children().detach();
1069-
1070-
$input.replaceWith(inputPlaceholder);
1071-
inputPlaceholder.replaceWith($input);
1072-
10731067
this.revertSettings = {
1074-
$children : inputChildren,
1068+
$children : $input.children().detach(),
10751069
tabindex : $input.attr('tabindex')
10761070
};
10771071

inst/www/shared/selectize/js/selectize.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)