Index: Source/core/html/forms/SearchInputType.cpp |
diff --git a/Source/core/html/forms/SearchInputType.cpp b/Source/core/html/forms/SearchInputType.cpp |
index 8b83268a971eaeb201a49f9c06fb54155ecf07af..ba6e85aab406bf7c847bc1eaf8ca91511504fd94 100644 |
--- a/Source/core/html/forms/SearchInputType.cpp |
+++ b/Source/core/html/forms/SearchInputType.cpp |
@@ -170,10 +170,13 @@ void SearchInputType::updateCancelButtonVisibility() |
Element* button = element().userAgentShadowRoot()->getElementById(ShadowElementNames::clearButton()); |
if (!button) |
return; |
- if (element().value().isEmpty()) |
- button->setInlineStyleProperty(CSSPropertyVisibility, CSSValueHidden); |
- else |
- button->removeInlineStyleProperty(CSSPropertyVisibility); |
+ if (element().value().isEmpty()) { |
+ button->setInlineStyleProperty(CSSPropertyOpacity, 0.0, CSSPrimitiveValue::CSS_NUMBER); |
+ button->setInlineStyleProperty(CSSPropertyPointerEvents, CSSValueNone); |
+ } else { |
+ button->removeInlineStyleProperty(CSSPropertyOpacity); |
+ button->removeInlineStyleProperty(CSSPropertyPointerEvents); |
+ } |
} |
bool SearchInputType::supportsInputModeAttribute() const |