瀏覽代碼

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

Frank Becker 14 年之前
父節點
當前提交
092a1180c9
共有 1 個文件被更改,包括 6 次插入0 次删除
  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)
 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
 	// 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)
 	{
 	{