Foxtrott has submitted this change and it was merged.
Change subject: fix menuselect: trim values
......................................................................
fix menuselect: trim values
Values are now trimmed before they are used in the form
Change-Id: I5a0953cd93254ce80ce23cb521a77858d53f8625
---
M libs/menuselect.js
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Foxtrott: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/libs/menuselect.js b/libs/menuselect.js
index 1c2bb36..32f0458 100644
--- a/libs/menuselect.js
+++ b/libs/menuselect.js
@@ -220,10 +220,11 @@
.mousedown( function() {
var content = jQuery( this ).children( "table" ).find(
".cont" );
+ var text = jQuery.trim( content.text() );
// set visible value and leave input
inputShow
- .attr( "value", content.text() )
+ .attr( "value", text )
.blur();
// set hidden value that gets sent back to the server
@@ -238,7 +239,7 @@
} else {
// just use text of list item
- jQuery( "#" + inputID ).attr( "value",
content.text() );
+ jQuery( "#" + inputID ).attr( "value", text );
}
return false;
--
To view, visit https://gerrit.wikimedia.org/r/63006
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5a0953cd93254ce80ce23cb521a77858d53f8625
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticFormsInputs
Gerrit-Branch: master
Gerrit-Owner: Foxtrott <[email protected]>
Gerrit-Reviewer: Foxtrott <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits