[
https://jira.jboss.org/jira/browse/RF-6537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nick Belaevski updated RF-6537:
-------------------------------
Fix Version/s: Future
Assignee: Pavel Yaschenko
Priority: Minor (was: Major)
> Elements outside of the modal panel could receive focus using tab key.
> ----------------------------------------------------------------------
>
> Key: RF-6537
> URL: https://jira.jboss.org/jira/browse/RF-6537
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.3.1
> Reporter: Sergey Rusak
> Assignee: Pavel Yaschenko
> Priority: Minor
> Fix For: Future
>
>
> Elements outside of the modal panel could receive focus using tab key.
> According to the current algorithm onfocus listener is added to the very
> first focusable element on the page to automatically redirect focus to the
> first element on the modal panel. This works fine unless the very first
> element is not visible( display='none' in my case). The solution could be
> adding the additional check to filter invisible elements(modalPanle.js):
> processAllFocusElements: function(root, callback) {
> var idx = -1;
> var tagName;
> if (root.focus && root.nodeType == 1 && (tagName = root.tagName) &&
> // Many not visible elements have focus method, we had to avoid
> processing them.
> (idx = this.formElements.indexOf(tagName.toLowerCase())) != -1 &&
> this.formElements.charAt(idx - 1) === '|' &&
> this.formElements.charAt(idx + tagName.length) === '|' &&
> !root.disabled && root.type!="hidden"
> && (Richfaces.getComputedStyle(root,'display')!='none')
> && (Richfaces.getComputedStyle(root,'visibility')!='hidden')){
> callback.call(this, root);
> } else {
> if (root != this.id) {
> var child = root.firstChild;
> while (child) {
> if (!child.style || child.style.display !=
> 'none') {
> this.processAllFocusElements(child,
> callback);
> }
> child = child.nextSibling;
> }
> }
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues