Opened 3 years ago

Closed 3 years ago

#14971 closed bug (notabug)

Jquery UI Selectable - event fires twice when browser was left

Reported by: thmoeller Owned by: thmoeller
Priority: minor Milestone: none
Component: ui.selectable Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:

Description

I have a selectable table with jquery ui and metakey active. For testing purpose i am alerting whenever a row is selected or deselected. This works as long as the focus remains within the browser (tested with Chrome, latest release). But when i click on an other application window and then return to the table directly clicking on a row, the selected event fires twice (two alerts).

$("#sel-table tbody").bind("mousedown", function(e) {

e.metaKey = true;

}).selectable({

selected: function( e, ui ) {

alert('Selected')

}

},{

unselected: function( e, ui ) {

alert('Unselected')

}

} );

Complete code on JS Fiddle (https://jsfiddle.net/tmoeller/pg9264d1)

Is it a bug or feature. If feature, how can this be avoided?? Any ideas on this??

tmoe

Change History (3)

comment:1 Changed 3 years ago by Scott González

Owner: set to thmoeller
Status: newpending

I'm not seeing this behavior. Can you please list the steps in detail? Are you seeing this only in certain browsers? Are you seeing this if you don't use alert()?

comment:2 Changed 3 years ago by Scott González

Component: ui.coreui.selectable

comment:3 Changed 3 years ago by Scott González

Resolution: notabug
Status: pendingclosed

Closing due to inactivity.

Note: See TracTickets for help on using tickets.