Disable browser provided autocomplete function in TitleInputWidget
authorFlorian <florian.schmidt.welzow@t-online.de>
Mon, 6 Jul 2015 23:03:47 +0000 (01:03 +0200)
committerLegoktm <legoktm.wikipedia@gmail.com>
Sun, 12 Jul 2015 03:44:05 +0000 (03:44 +0000)
TitleInputWidget provides its own autocomplete suggestions, the browser
suggestions (of previously entered search terms) would overlap the
own suggestion list.

Disable the browser provided autocomplete function with autocomplete="off".

Depends on cd64c1ad3de in OOUI.

Bug: T105459
Change-Id: I01468395d708d84fbaf73983d95c1461e255c600

resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js

index df2f1a7..ca8c400 100644 (file)
@@ -30,7 +30,7 @@
                config = config || {};
 
                // Parent constructor
-               OO.ui.TextInputWidget.call( this, config );
+               OO.ui.TextInputWidget.call( this, $.extend( {}, config, { autocomplete: false } ) );
 
                // Mixin constructors
                OO.ui.mixin.LookupElement.call( this, config );