wvega / timepicker

A jQuery plugin to enhance standard form input fields helping users to select (or type) times
http://timepicker.co
GNU General Public License v2.0
216 stars 92 forks source link

When clicking on the scrollbar, the dropdown disappears #66

Open xairrick opened 9 years ago

xairrick commented 9 years ago

I've seen this in both IE & Chrome. with the scrollbar: true option the scrollbar appears, but when you click the mouse on the scrollbar, the dropdown disappears -> http://jsfiddle.net/6v6bex3f/

xairrick commented 9 years ago

I fixed this by changing the blur event

.bind("blur.timepicker", function (e) {
                setTimeout(function () {
                    if (document.activeElement.className !== "ui-timepicker ui-widget ui-widget-content ui-menu ui-corner-all") {
                        // Don't close if the dropdown got focus
                        t.close();
                    }
                }, 1);
            })