diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
index bd6a08d61cdb..ecd0b2faf4b0 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -1788,6 +1788,10 @@ HTMLInputElement::GetNonFileValueInternal(nsAString& aValue) const
bool
HTMLInputElement::IsValueEmpty() const
{
+ if (GetValueMode() == VALUE_MODE_VALUE && IsSingleLineTextControl(false)) {
+ return !mInputData.mState->HasNonEmptyValue();
+ }
+
nsAutoString value;
GetNonFileValueInternal(value);