Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit dbd32f2

Browse files
committed
fix: appendToBody doesn't work with jQuery < 1.10.0
.relpaceWith in jQuery (version less then 1.10) doesn't work properly and as so, ui-select with 'appendToBody=true' doesn't display selected value. Use .after() and .remove() instead of .replaceWith() to avoid this issue.
1 parent 948d383 commit dbd32f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/uiSelectDirective.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ uis.directive('uiSelect',
240240
}
241241

242242
// Move the dropdown element back to its original location in the DOM
243-
placeholder.replaceWith(element);
243+
placeholder.after(element);
244+
placeholder.remove();
244245
placeholder = null;
245246

246247
element[0].style.position = '';

0 commit comments

Comments
 (0)