Reviewed by Adam Barth.
[codereviewtool] don't let lines/diffblocks be mouse focusable
https://bugs.webkit.org/show_bug.cgi?id=54851
Unfortunately, this will only work once https://bugs.webkit.org/show_bug.cgi?id=54727
is committed. In the interim, it won't break anything.
* code-review.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@79185
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-02-20 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [codereviewtool] don't let lines/diffblocks be mouse focusable
+ https://bugs.webkit.org/show_bug.cgi?id=54851
+
+ Unfortunately, this will only work once https://bugs.webkit.org/show_bug.cgi?id=54727
+ is committed. In the interim, it won't break anything.
+
+ * code-review.js:
+
2011-02-20 Ojan Vafai <ojan@chromium.org>
Reviewed by Adam Barth.
// -1 makes the element focusable without actually putting in in the tab order.
node.attr('tabindex', -1);
node.focus();
+ // Remove the tabindex on blur to avoid having the node be mouse-focusable.
+ node.bind('blur', function() { node.removeAttr('tabindex'); });
$(document).scrollTop(node.position().top - window.innerHeight / 2);
}