Browse Source

When using tab to move focus to the next focusable element, skip over disabled elements.

Frank Becker 14 years ago
parent
commit
092a1180c9
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Source/Core/ElementDocument.cpp

+ 6 - 0
Source/Core/ElementDocument.cpp

@@ -467,6 +467,12 @@ bool ElementDocument::FocusNextTabElement(Element* current_element, bool forward
 
 bool ElementDocument::SearchFocusSubtree(Element* element, bool forward)
 {
+	// Skip disabled elements
+	if (element->IsPseudoClassSet("disabled"))
+	{
+		return false;
+	}
+
 	// Check if this is the node we're looking for
 	if (element->GetProperty<int>(TAB_INDEX) == TAB_INDEX_AUTO)
 	{