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

Google Map Search doesn't work with accept or enter #300

Closed
dp4818 opened this issue Aug 14, 2014 · 4 comments
Closed

Google Map Search doesn't work with accept or enter #300

dp4818 opened this issue Aug 14, 2014 · 4 comments

Comments

@dp4818
Copy link

dp4818 commented Aug 14, 2014

Hi Mottie,
I'm working with Google map, and I found this interesting issue. Thanks.
#242

it's almost what i need, but after typing i can't search with the virtual keyboard,
both enter and accept don't work, but it works when i press enter with physical keyboard.

I've tried to set autoAccept to true and enterNavigation to false, but it still doesn't work.
How can I make it work?

Thanks!

@Mottie
Copy link
Owner

Mottie commented Aug 14, 2014

Hi @dp4818!

Try triggering a focus event like in the code from that issue... I am terribly busy until next week, so I won't have a chance to look at this until then.

@dp4818
Copy link
Author

dp4818 commented Aug 15, 2014

I found my answer! Like this

change: function (e, keyboard, el) {
  google.maps.event.trigger(el, 'focus', {});
},
accepted: function (e, keyboard, el) {
  google.maps.event.trigger(el, 'keydown', { keyCode: 13 });
}

Thanks!

@tauseefjanjua
Copy link

tauseefjanjua commented May 17, 2019

I am having same issue but with dataTables.
The Search is not accepting input from (Mottie virtual keyboard). What is the possible solution?

Here is the fiddle see this issue in actual.
fiddle
I tried to use:

change: function (e, keyboard, el) { dataTableExt.sSearchPlaceholder.event.trigger(el, 'focus', {}); }
accepted: function (e, keyboard, el) { dataTableExt.sSearchPlaceholder.event.trigger(el, 'keydown', { keyCode: 13 }); }

but doesn't work.

Any suggestions?

@Mottie
Copy link
Owner

Mottie commented May 17, 2019

Hi @tauseefjanjua!

I also put this answer in your SO question:

Demo

$(function() {
  var table = $("#example")
    .on("init.dt", function() {
      $('input[type="search"]').keyboard({
        usePreview: false,
        change: function(e, kb) {
          table.search(kb.el.value).draw();
        }
      });
    })
    .DataTable();
});

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

No branches or pull requests

3 participants