From bd1eb9e46e0a52df532ad2a8ecb42c76ba6bcaa7 Mon Sep 17 00:00:00 2001 From: "allan%beaufour.dk" Date: Sat, 29 Jan 2005 11:37:33 +0000 Subject: [PATCH] Make selects incremental by default. Bug 278881, patch by aaronr, r=smaug, sr=bryner --- extensions/xforms/nsXFormsSelectElement.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/xforms/nsXFormsSelectElement.cpp b/extensions/xforms/nsXFormsSelectElement.cpp index 2600414e89d4..13f90e091aa4 100644 --- a/extensions/xforms/nsXFormsSelectElement.cpp +++ b/extensions/xforms/nsXFormsSelectElement.cpp @@ -361,7 +361,10 @@ nsXFormsSelectElement::HandleEvent(nsIDOMEvent *aEvent) nsAutoString value; mElement->GetAttribute(NS_LITERAL_STRING("incremental"), value); - PRBool isIncremental = value.EqualsLiteral("true"); + + // the default incremental value for a select element is 'true' according + // to the spec, so if there is no incremental value, assume true. + PRBool isIncremental = !value.EqualsLiteral("false"); if ((isIncremental && type.EqualsLiteral("change")) || (!isIncremental && type.EqualsLiteral("blur"))) {