autocomplete: fix duplicate/missing tracking events
authorErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 16 Jun 2016 15:56:43 +0000 (08:56 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 20 Jun 2016 20:39:16 +0000 (13:39 -0700)
commit3d43eaa821a5a98440c3834ddff5cccb3c9449db
treed2804050fb87fcd88e061de03373ae6271749cf0
parent57271df94c1a1862a019b7dc939b801a723f2ec3
autocomplete: fix duplicate/missing tracking events

The submit-form and click-result handlers are in some cases being fired for the
same user interaction. The causes duplicate events to be collected from
WikimediaEvents. See also Ic1e0d08d for tests of this functionality along with
updates necessary to ensure all the right events are showing up on the backend.

Additionally adjusts to ensure all reports of position selected/clicked
are 0 indexed.

Change-Id: Ie7348e470754746c85f53dbe447b88176c2a0bcc
includes/specials/SpecialSearch.php
resources/src/jquery/jquery.suggestions.js
resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
resources/src/mediawiki/mediawiki.searchSuggest.js