Skip to content

Problem when using destroy method #358

@jokytam168

Description

@jokytam168

Dear Mottie,
Thank you for your great work, I am very appreciated with this fancy script.

I have a problem, when I call destroy method, I always get from the console

Uncaught TypeError: Cannot read property 'el' of null

What I want is user click open keyboard, and still could key in normally.
Although it still works as I wish, any suggestion to fix? Here is the html & code I use

<form>
<a id="ekeyboard" href="#">show keyboard</a>
<input type="text" id="txtPassword" name="txtPassword">
</form>

<script>
$("#ekeyboard").on('click',function(){
   $('#txtPassword').keyboard({
      beforeClose: function(event, keyboard, el) {
         keyboard.destroy();
      }
   });
   $('#txtPassword').focus();
});
</script>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions