Author: pyaschenko
Date: 2008-07-17 10:20:34 -0400 (Thu, 17 Jul 2008)
New Revision: 9659
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.org/jira/browse/RF-3572
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
---
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-07-17
14:08:28 UTC (rev 9658)
+++
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-07-17
14:20:34 UTC (rev 9659)
@@ -389,20 +389,23 @@
e.focus();
}
},
-
+
+ rExpFormElements : /^(?:a|input|select|button|textarea)$/i,
+ rExpHidden : /^hidden$/,
+
processAllFocusElements: function(root, callback) {
if (root.focus &&
// Many not visible elements have focus method, we is had to avoid processing them.
- /^(?:a|input|select|button|textarea)$/i.test(root.tagName) &&
- !root.disabled && !/^hidden$/.test(root.type) &&
- Element.visible(root)) {
+ this.rExpFormElements.test(root.tagName) &&
+ !root.disabled && !this.rExpHidden.test(root.type) &&
+ root.style.display != 'none') {
callback.call(this, root);
} else {
if (root != this.id) {
var child = root.firstChild;
while (child) {
- if (!child.style || Element.visible(child)) {
+ if (!child.style || child.style.display != 'none') {
this.processAllFocusElements(child, callback);
}
child = child.nextSibling;