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

Lost focus when click between buttons or when keep key pressed #19

Open
RicardoBer opened this issue Nov 1, 2018 · 1 comment
Open

Comments

@RicardoBer
Copy link

There are several wrong behaviors derived from the fact that when you click on the keyboard the imput lose the focus.

The idea under this propouse is that if you click in any point of the keyboard it must return the focus to the current input.

I propouse this change to Keyboard.prototype.init

Keyboard.prototype.init = function() {
  this.$keyboard.append(this.renderKeys());
  this.$keyboard.append(this.$modifications_holder);
  $("body").append(this.$keyboard);

  if (this.options.is_hidden) this.$keyboard.hide();

  this.setUpKeys();
  //INIT MOD 2018-11-01
  var _this = this;
  this.$keyboard.on('click', function (){ 
    if(_this.$current_input) 
      _this.keep_focus = true;
      _this.$current_input.focus(); 
  })
  //END MOD 2018-11-01
};
@kyselejsyrecek
Copy link

Thank you for reporting, Ricardo.
The issues have been resolved in https://github.com/kyselejsyrecek/jquery.mlkeyboard/releases/tag/1.0.0.

Kind regards,
Lukáš Chmela

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

2 participants