Index: Source/core/rendering/RenderMenuList.cpp |
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp |
index 5b28b71bb3d84b4cd73f0abdc16aae52d9144f0c..5d7457a8ccfe6d054a7483aa3c77dda0c9350eef 100644 |
--- a/Source/core/rendering/RenderMenuList.cpp |
+++ b/Source/core/rendering/RenderMenuList.cpp |
@@ -201,10 +201,14 @@ void RenderMenuList::updateFromElement() |
m_optionsChanged = false; |
} |
- if (m_popupIsVisible) |
+ if (m_popupIsVisible) { |
m_popup->updateFromElement(); |
- else |
- setTextFromOption(selectElement()->selectedIndex()); |
+ } else { |
+ if (selectElement()->suggestedIndex() >= 0) |
+ setTextFromOption(selectElement()->suggestedIndex()); |
+ else |
+ setTextFromOption(selectElement()->selectedIndex()); |
+ } |
} |
void RenderMenuList::setTextFromOption(int optionIndex) |