Skip to content

Commit

Permalink
punbb.common.js: fix autofocus algoritm - skip hidden elements
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkalinux committed Jul 23, 2011
1 parent de7cbf2 commit ad915b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/js/min/punbb.common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion include/js/punbb.common.js
Expand Up @@ -437,7 +437,7 @@ PUNBB.common = (function () {
//
autoFocus: function () {
var fn_input = function (x) {
return x.tagName.toUpperCase() == "TEXTAREA" || (x.tagName.toUpperCase() == "INPUT" && (x.type == "text") || (x.type == "password") || (x.type == "email") || (x.type == "url") || (x.type == "number"));
return x.offsetWidth > 0 && (x.tagName.toUpperCase() == "TEXTAREA" || (x.tagName.toUpperCase() == "INPUT" && (x.type == "text") || (x.type == "password") || (x.type == "email") || (x.type == "url") || (x.type == "number")));
};

var nodes = get("afocus");
Expand Down

0 comments on commit ad915b4

Please sign in to comment.