Commit 5923a0c9 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't try to call focus() on hidden inputs


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent f4139c26
......@@ -50,6 +50,10 @@ function PieformManager() {//{{{
forEach(check, function(form) {
var element = getFirstElementByTagAndClassName(null, 'autofocus', form);
if (element && (typeof(element.focus) == 'function' || (element.focus && element.focus.call))) {
var type = getNodeAttribute(element, 'type');
if (type && type == 'hidden') {
return;
}
element.focus();
if (hasElementClass(element, 'autoselect')
&& (typeof(element.select) == 'function' || (element.focus && element.select.call))) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment