Browse Source

Bugfix: it was possible to focus invisible elements using TAB

Avoid focusing invisible elements by early exiting ElementDocument::SearchFocusSubtree in such cases
Victor Luchitz 13 years ago
parent
commit
b2c19f72fd
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Source/Core/ElementDocument.cpp

+ 4 - 0
Source/Core/ElementDocument.cpp

@@ -472,6 +472,10 @@ bool ElementDocument::SearchFocusSubtree(Element* element, bool forward)
 	{
 	{
 		return false;
 		return false;
 	}
 	}
+	if (!element->IsVisible())
+	{
+		return false;
+	}
 
 
 	// Check if this is the node we're looking for
 	// Check if this is the node we're looking for
 	if (element->GetProperty<int>(TAB_INDEX) == TAB_INDEX_AUTO)
 	if (element->GetProperty<int>(TAB_INDEX) == TAB_INDEX_AUTO)