Conditionally render search placeholder text (#450)
Placeholder text was appearing cropped in menuWidth = 'narrow' This commit serves to conditionally render placeholder text to a shorter 'Search' Bug: https://phabricator.wikimedia.org/T318633
This commit is contained in:
1 parent
92aa012bc7
commit
9eddca7d53
3 files changed
+9
-3
No files matched your search
@@ -174,7 +174,11 @@
|
||||
i18n: function () {
|
||||
if ( $.i18n ) {
|
||||
this.$menu.find( '[data-i18n]' ).i18n();
|
||||
this.$languageFilter.prop( 'placeholder', $.i18n( 'uls-search-placeholder' ) );
|
||||
if ( this.getMenuWidth() === 'narrow' ) {
|
||||
this.$languageFilter.prop( 'placeholder', $.i18n( 'uls-search-placeholder-short' ) );
|
||||
} else {
|
||||
this.$languageFilter.prop( 'placeholder', $.i18n( 'uls-search-placeholder' ) );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user