Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

If minChars value is set to 0, display:none on autocomplete-suggestion does not work properly. #56

Copy link
Copy link
@nits41089

Description

@nits41089
Issue body actions

mousedown event on element

.autocomplete-suggestion

propagates back to input field which triggers focus.

        live('autocomplete-suggestion', 'mousedown', function(e){
           if (hasClass(this, 'autocomplete-suggestion')) { // else outside click
                var v = this.getAttribute('data-val');
                that.value = v;
                o.onSelect(e, v, this);
                that.sc.style.display = 'none';
            }
        }, that.sc);

On focus the below event is triggered, because of which .autocomplete-suggestion is again visible.

if (!o.minChars) addEvent(that, 'focus', that.focusHandler);

To avoid this I have added e.preventDefault(); in live('autocomplete-suggestion', 'mousedown', function(e){...} function.
Please see if you can recreate and provide a better solution for this.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.