Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

prevent enter from doing a form submit on the list search filter #1068

Closed
@hakanson

Description

@hakanson

If you are using a list with a search filter (e.g. http://jquerymobile.com/test/docs/lists/lists-search.html) and you hit enter while focus is in the search box, it submits the form and brings you back to the same page with an empty querystring (http://jquerymobile.com/test/docs/lists/lists-search.html?)

Not sure if this is expected behavior. In my local code, I added a submit handler on the ancestor form but not sure if this the best way to handle this.

//"search" input widget
if( input.is('[type="search"],[data-type="search"]') ){
// add something like this???
    input.parents("form").submit(function() {
        return false;
    });
}

It was causing me problems running a WebWorks app using jQuery Mobile on the BlackBerry PlayBook simulator (current bug handling querystrings with the simulator).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions