Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS keyboard click on done makes suggestion list disappear #387

Open
OzorNox opened this issue Jun 18, 2019 · 2 comments
Open

iOS keyboard click on done makes suggestion list disappear #387

OzorNox opened this issue Jun 18, 2019 · 2 comments

Comments

@OzorNox
Copy link

OzorNox commented Jun 18, 2019

When I click on 'done' on my iOS keyboard in Safari (to get a better view on the whole suggestion list), the suggestion list disappears by default. Is it possible to edit this behavior? It would be great to have an option or possibility to disable the outside/offset click and add a closing button (cross) in the input box.

@css3coder
Copy link

I join the question

@iantrudell
Copy link

iantrudell commented Dec 9, 2019

Also looking for more information on this - I want the list to stay open when the user hits "Done" in the iOS Safari Keyboard

EDIT:

I've come up with a workaround by editing the bindBlur function:

function bindBlur() {
    // $field.blur(function (event) {

    //     setTimeout(function () {

    //         selectedElement = -1;
    //         hideContainer();
    //     }, 250);
    // });

    jQuery('body').on('click', function (e) {
        if (jQuery(e.target).closest('.easy-autocomplete input').length === 0) {
            selectedElement = -1;
            hideContainer();
        }
    });
}

This makes it so only clicking on the body (but not on the input) will close the dropdown. Key presses will not close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants