Project

General

Profile

Bug #1798

WSuggestionPopup doesn't work on mobile browsers

Added by Anonymous almost 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/31/2013
Due date:
% Done:

0%

Estimated time:

Description

Workaround is to bind to the DOM 'input' event.

It probably wouldn't be a bad idea to add support for the 'input' event generally.

void Util::FixSuggestionPopup(WSuggestionPopup *suggest, WFormWidget *edit)
{
    std::string js =
        "jQuery(" + edit->jsRef() + ").bind('input', function() {"
        """var o = jQuery.data(" + suggest->jsRef() + ", 'obj');"
        """if (o) {"
        """""o.showAt(" + edit->jsRef() + ");"
        """""o.refilter();"
        """}"
        "});";
    suggest->doJavaScript(js);
}

No data to display

Also available in: Atom PDF