Message: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

Minqensan - July 2, 2009 - 00:57
Project:Ajax
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I get this (critical, breaks all js) message in IE:
Message: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

With disable redirect on.

It's caused by this line in ajax_disable_redirect.js:

<?php
     
else {
        $(
'.form-item :input', args.local.form[0])[0].focus();
      }
?>

Removing it will fix the error. But I'm not sure if there's a better solution.

By the way, the form element is indeed hidden. There should be a check to check for that.

 
 

Drupal is a registered trademark of Dries Buytaert.