Bartosz Dziewoński has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/366486 )
Change subject: TextInputWidget: When positioning label, don't clear padding if
we will set it again
......................................................................
TextInputWidget: When positioning label, don't clear padding if we will set it
again
This in most cases prevents the unpleasant "flickering" effect, and
the text cursor being hidden under the label, when typing at the end
of a horizontally scrollable input with a dynamic label.
However, if the width of the label increases, the issue still occurs.
This case needs some further thought.
Bug: T169982
Change-Id: I06d539c63645fe8698a73ac1749b5d3ebbba6ede
---
M src/widgets/TextInputWidget.js
1 file changed, 5 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/86/366486/1
diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 16a7027..628303b 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -669,18 +669,15 @@
return this;
}
- // Clear old values
- this.$input
- // Clear old values if present
- .css( {
- 'padding-right': '',
- 'padding-left': ''
- } );
-
if ( this.label ) {
this.$element.append( this.$label );
} else {
this.$label.detach();
+ // Clear old values if present
+ this.$input.css( {
+ 'padding-right': '',
+ 'padding-left': ''
+ } );
return;
}
--
To view, visit https://gerrit.wikimedia.org/r/366486
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06d539c63645fe8698a73ac1749b5d3ebbba6ede
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits