HomePhabricator

searchSatisfaction: Don't bind high-level delegated event handler

Description

searchSatisfaction: Don't bind high-level delegated event handler

I2710b28e introduced a performance regression by attaching a delegated
event handler to the body element that would require at least running a
jQuery Selector once whenever an input, change, paste, or keypress event
was emitted for any element on the page.

Following Krinkle's advice in T274869#6902338, bind the delegated event
handler to #p-search or #searchText elements, which are container
elements for search boxes on all pages (the latter is the container
element for the search box on Special:Search).

Bug: T274869
Change-Id: Ic0d97eca480c6b38c4e79a03b2b6ca5957ebabe1

Details

Provenance
phuedxAuthored on Mar 11 2021, 11:26 AM
Parents
rEWMV70b42d558905: Merge "Revert "Error in shouldLog logic drops most errors""
Branches
Unknown
Tags
Unknown
References
refs/changes/34/670834/2
ChangeId
Ic0d97eca480c6b38c4e79a03b2b6ca5957ebabe1