Bug: T168220
Change-Id: I3ae6fba358456745cb570840211319f7eac754ce
filterItem.clearHighlightColor();
} );
};
+
+ /**
+ * Return a version of the given string that is without any
+ * view triggers.
+ *
+ * @param {string} str Given string
+ * @return {string} Result
+ */
+ mw.rcfilters.dm.FiltersViewModel.prototype.removeViewTriggers = function ( str ) {
+ if ( this.getViewByTrigger( str.substr( 0, 1 ) ) !== 'default' ) {
+ str = str.substr( 1 );
+ }
+
+ return str;
+ };
}( mediaWiki, jQuery ) );
this.selectTag( tagItem );
// Scroll to the item
- if ( oldInputValue ) {
+ if ( this.model.removeViewTriggers( oldInputValue ) ) {
// We're binding a 'once' to the itemVisibilityChange event
// so this happens when the menu is ready after the items
// are visible again, in case this is done right after the