input blur event is not calling while using ui-sortable
In my use case i have to create editable list . But blur event on input box is not calling.
Can you fork one of the provided examples on README to demonstrate your use case? For such use cases (from what I can understand till now) defining grab handler elements for each list item was proved useful. Are you using them?
Thodoris Greasidis Computer, Networking & Communications Engineer
http://codepen.io/strelcov/pen/RRRWPB when I click anywhere ng-blur works, when I click on ui-sortable elements ng-blur doesn't work. Can you help with this problem?
It seems that jquery-ui makes the sortable items un-focusable.
The best workaround I found for now is to use the start option explicitly.
start: function (e, ui) {
$('[ng-blur]').blur();
},
it works , if I start to pull the item . if you just click on the sortable element ng-blur doesn't work (
jQuery-ui probably intercepts & prevents the propagation of the mousedown event, so that it can handle the dragging.
when I changed the sortable element with the span on the button ng-blur began to work , but the button is not draggable element. Can I make a button, perhaps in the options, drag and drop items?
Try using the handle option but it will probably not work. You can also try using a label for a dummy input.
On Wed, Jun 15, 2016, 17:10 IvanStrelcov [email protected] wrote:
when I changed the sortable element with the span on the button ng-blur began to work , but the button is not draggable element. Can I make a button, perhaps in the options, drag and drop items?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular-ui/ui-sortable/issues/453#issuecomment-226198905, or mute the thread https://github.com/notifications/unsubscribe/ABPF1fmed1XWaO7YdYkVGboYkxTVK9FHks5qMAfrgaJpZM4IP8iB .
Thodoris Greasidis
I also encountered this problem, how do you solve it?
Let it be my shame, but I decided that using a crutch like this
export default class GroupController() {
constructor($element) {
'ngInject';
this.$element = $element;
this.$element.on('click', () => {
document.activeElement.blur();
});
}
Where this.$element is the parent of droppable element