diff --git a/src/widgets/OO.ui.InputWidget.js b/src/widgets/OO.ui.InputWidget.js
index <HASH>..<HASH> 100644
--- a/src/widgets/OO.ui.InputWidget.js
+++ b/src/widgets/OO.ui.InputWidget.js
@@ -107,16 +107,16 @@ OO.ui.InputWidget.prototype.setRTL = function ( isRTL ) {
  * @chainable
  */
 OO.ui.InputWidget.prototype.setValue = function ( value ) {
-	var domValue = this.$input.val();
 	value = this.sanitizeValue( value );
 	if ( this.value !== value ) {
 		this.value = value;
-		// Only update the DOM if we must
-		if ( domValue !== this.value ) {
-			this.$input.val( value );
-		}
 		this.emit( 'change', this.value );
 	}
+	// Update the DOM if it has changed. Note that with sanitizeValue, it
+	// is possible for the DOM value to change without this.value changing.
+	if ( this.$input.val() !== this.value ) {
+		this.$input.val( this.value );
+	}
 	return this;
 };
Account for sanitization changes properly in InputWidget

setValue() doesn't do anything if this.value === value, but with
sanitization it's possible for that to be true while the value in
the DOM is out of sync and needs to be changed.

The fix is to check for this.value changing and the DOM changing
separately.

Change-Id: I5f<I>f<I>f<I>c<I>a4ee<I>b<I>a8