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

Commit

Permalink
Merge pull request #1958 from graingert/disable-drop-in-csp-environments
Browse files Browse the repository at this point in the history
disable drop under CSP
  • Loading branch information
Jefiozie authored Jun 7, 2017
2 parents 912a70a + 2b4880b commit d62cac2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/select-multiple.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
aria-expanded="{{$select.open}}"
aria-label="{{$select.baseTitle}}"
ng-class="{'spinner': $select.refreshing}"
ondrop="return false;">
data-disallow-drop=data-disallow-drop>
</div>
<div class="ui-select-choices"></div>
<div class="ui-select-no-choice"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/select2/select-multiple.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
ng-model="$select.search"
ng-click="$select.activate()"
style="width: 34px;"
ondrop="return false;">
data-disallow-drop=data-disallow-drop>
</li>
</ul>
<div class="ui-select-dropdown select2-drop select2-with-searchbox select2-drop-active"
Expand Down
2 changes: 1 addition & 1 deletion src/selectize/select-multiple.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ng-disabled="$select.disabled"
aria-expanded="{{$select.open}}"
aria-label="{{ $select.baseTitle }}"
ondrop="return false;">
data-disallow-drop=data-disallow-drop>
</div>
<div class="ui-select-choices"></div>
<div class="ui-select-no-choice"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/uiSelectSortDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ uis.directive('uiSelectSort', ['$timeout', 'uiSelectConfig', 'uiSelectMinErr', f
}
});

if (element.data('disallowDrop')) {
return;
}

element.on('dragstart', function(event) {
element.addClass(draggingClassName);

Expand Down

0 comments on commit d62cac2

Please sign in to comment.