comment on strange focus code and shorten the timeout to make things more fluid

pull/416/head
jwollert 11 years ago
parent e578886c61
commit dd8d60f2b0
  1. 5
      app/assets/javascripts/top_menu.js

@ -188,10 +188,13 @@
if (toFocus.length == 0) { if (toFocus.length == 0) {
toFocus = dropdown.find("ul a:visible:first"); toFocus = dropdown.find("ul a:visible:first");
} }
// actually a simple focus should be enough.
// The rest is only there to work around a rendering bug in webkit (as of Oct 2011),
// occuring mostly inside the login/signup dropdown.
toFocus.blur(); toFocus.blur();
setTimeout(function() { setTimeout(function() {
toFocus.focus(); toFocus.focus();
}, 100); }, 10);
}, },
registerEventHandlers: function () { registerEventHandlers: function () {

Loading…
Cancel
Save