Index: Source/WebCore/html/HTMLSelectElement.cpp |
=================================================================== |
--- Source/WebCore/html/HTMLSelectElement.cpp (revision 142679) |
+++ Source/WebCore/html/HTMLSelectElement.cpp (working copy) |
@@ -1161,9 +1161,9 @@ |
if (keyCode == ' ' || keyCode == '\r') { |
focus(); |
- // Calling focus() may cause us to lose our renderer, in which case |
- // do not want to handle the event. |
- if (!renderer()) |
+ // Calling focus() may remove the renderer or change the |
+ // renderer type. |
+ if (!renderer() || !renderer()->isMenuList()) |
return; |
// Save the selection so it can be compared to the new selection |
@@ -1179,9 +1179,9 @@ |
if (keyCode == ' ') { |
focus(); |
- // Calling focus() may cause us to lose our renderer, in which case |
- // do not want to handle the event. |
- if (!renderer()) |
+ // Calling focus() may remove the renderer or change the |
+ // renderer type. |
+ if (!renderer() || !renderer()->isMenuList()) |
return; |
// Save the selection so it can be compared to the new selection |