Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14710
getValueFix.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 22 2014, 3:43 AM
2014-11-22 03:43:25 (UTC+0)
Size
649 B
Referenced Files
None
Subscribers
None
getValueFix.diff
View Options
diff --git a/lib/oojs-ui/oojs-ui.js b/lib/oojs-ui/oojs-ui.js
index f9b608f..dedf40b 100644
--- a/lib/oojs-ui/oojs-ui.js
+++ b/lib/oojs-ui/oojs-ui.js
@@ -8580,6 +8580,19 @@ OO.ui.TextInputWidget.prototype.getInputElement = function ( config ) {
return config.multiline ? this.$( '<textarea>' ) : this.$( '<input type="text" />' );
};
+/**
+ * Get the value of the input.
+ *
+ * @return {string} Input value
+ */
+OO.ui.TextInputWidget.prototype.getValue = function () {
+ // validate the input is up to date
+ if ( this.value !== this.$input.val() ) {
+ this.setValue( this.$input.val() );
+ }
+ return this.value;
+};
+
/* Methods */
/**
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14112
Default Alt Text
getValueFix.diff (649 B)
Attached To
Mode
T86868: InputWidgets should detect the internal .value property and the <input>'s .value property getting desynchronised and do something smart
Attached
Detach File
T71749: VisualEditor: saveOptions.summary is not updated if the summary is inserted using a tool (InputWidget relies on 'change' events rather than checking the value)
Attached
Detach File
Event Timeline
Log In to Comment