Opened 7 years ago
Last modified 7 years ago
#15100 new bug
Draggable: Cause focus and blur triggered every time when clicking the element
Reported by: | flyoverL | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.draggable | Version: | 1.12.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
jsBin: http://jsbin.com/qahiyib/2/edit?html,js,console,output
At the version 1.12.1, Every time when clicking a draggable element, its focus event is always triggered.
Before the version 1.11.4, Every time when clicking a draggable element, both focus and blur event are always triggered.
I think the following source of draggable in JqueryUi may cause this problem:
_mouseUp: function( event ) { this._unblockFrames(); //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) if ( $.ui.ddmanager ) { $.ui.ddmanager.dragStop(this, event); } var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ); // Only need to focus if the event occurred on the draggable itself, see #10527 //if ( this.handleElement.is( event.target ) ) { if (this.handleElement.is( event.target)) { // The interaction is over; whether or not the click resulted in a drag, focus the element this.element.focus(); } return $.ui.mouse.prototype._mouseUp.call(this, event); }
Note: See
TracTickets for help on using
tickets.