Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

input blur event is not calling while using ui-sortable #453

Open
ashpareek opened this issue Apr 26, 2016 · 9 comments
Open

input blur event is not calling while using ui-sortable #453

ashpareek opened this issue Apr 26, 2016 · 9 comments

Comments

@ashpareek
Copy link

In my use case i have to create editable list . But blur event on input box is not calling.

@thgreasi
Copy link
Contributor

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

@IvanStrelcov
Copy link

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?

@thgreasi
Copy link
Contributor

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();
},

@IvanStrelcov
Copy link

it works , if I start to pull the item . if you just click on the sortable element ng-blur doesn't work (

@thgreasi
Copy link
Contributor

jQuery-ui probably intercepts & prevents the propagation of the mousedown event, so that it can handle the dragging.

@IvanStrelcov
Copy link

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?

@thgreasi
Copy link
Contributor

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
#453 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABPF1fmed1XWaO7YdYkVGboYkxTVK9FHks5qMAfrgaJpZM4IP8iB
.

Thodoris Greasidis

@wangwy
Copy link

wangwy commented Aug 31, 2016

I also encountered this problem, how do you solve it?

@IvanStrelcov
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants