brantburnett/jquery.ui.spinner

focus-loop bug

Opened this issue · 0 comments

When i use TAB to navigate through my form, sometimes the spinner starts to steal the focus. When it happens, it becomes a focus-loop. I think it has to do with the setTimeOut.

I solved it by removing some code:

original

.bind('focus' + eventNamespace, function() {
function selectAll() {
self.element.select();
}
msie ? selectAll() : setTimeout(selectAll, 0); // add delay for Chrome, but breaks IE8
...

bugfix

.bind('focus' + eventNamespace, function() {
self.element.select();
....

(Seems to work in Chrome 15)