Expand all

mobile.startup/search.SearchOverlay

Overlay displaying search results

Constructor

new module:mobile.startup/search.SearchOverlay(params) #

Parameters:

Name Type Description
params Object

Configuration options

Properties:
Name Type Attributes Description
placeholderMsg string

Search input placeholder text.

action string optional

of form defaults to the value of wgScript

defaultSearchPage string optional

The default search page e.g. Special:Search

gateway optional
Source:

Methods

hideKeyboardOnScroll() #

Hide the keyboard when scrolling starts (avoid weird situation when user taps on an item, the keyboard hides and wrong item is clicked).

Source:

Hide the keyboard when scrolling starts (avoid weird situation when user taps on an item, the keyboard hides and wrong item is clicked).

onClickOverlayContent() #

Tapping on background only should hide the overlay

Source:
Tapping on background only should hide the overlay

onClickResult(ev) #

Handle the user clicking a result.

Parameters:

Name Type Description
ev jQuery.Event
Source:
Handle the user clicking a result.

onClickSearchContent() #

Initialize 'search within pages' functionality

Source:
Initialize 'search within pages' functionality

performSearch(query) #

Perform search and render results inside current view. FIXME: Much of the logic for caching and pending queries inside this function should actually live in SearchGateway, please move out.

Parameters:

Name Type Description
query string
Source:
Perform search and render results inside current view.

showKeyboard() #

Trigger a focus() event on search input in order to bring up the virtual keyboard.

Source:

Trigger a focus() event on search input in order to bring up the virtual keyboard.