From 8ca3a19cd96dd1a8e6ecd532d5d8ba56d913c052 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 5 Dec 2017 12:17:19 +0100 Subject: [PATCH] * Tracker: Fix broken tracker queue selectbox filter --- api/js/etemplate/et2_widget_selectbox.js | 27 ++++++++++-------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index a67b8873da..e1fe9a24c1 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -753,22 +753,17 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( // Initialize the single row class $chosen_div.toggleClass('et2_selectbox_single_row', true); - // bind hover actions - $chosen_div - .off() - .hover( - //mouseIn - function(e){ - jQuery(this).toggleClass('et2_selectbox_multi_row', true); - jQuery(this).toggleClass('et2_selectbox_single_row', false); - }, - //mouseOut - function(e){ - jQuery(this).toggleClass('et2_selectbox_multi_row', false); - jQuery(this).toggleClass('et2_selectbox_single_row', true); - _update_item_counter(); - } - ); + // bind mouse handlers + $chosen_div.on('mouseleave mouseup', function(e){ + jQuery(this).toggleClass('et2_selectbox_multi_row', false); + jQuery(this).toggleClass('et2_selectbox_single_row', true); + _update_item_counter(); + }); + + $chosen_div.on('mouseenter', function(e){ + jQuery(this).toggleClass('et2_selectbox_multi_row', true); + jQuery(this).toggleClass('et2_selectbox_single_row', false); + }); } } },