Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dunnleaddress

    (@dunnleaddress)

    i think i found a bug myself: in virtualkeyboard.php line 1438 -> if (!subm) self.VKI_target.form.submit(); -> need to remove the NOT subm to be like this -> if (subm) self.VKI_target.form.submit();

    i appreciate the author confirm this bug fix is correct. Thanks again for a great job.

    For those who can not get it installed and working you can email dunnleaddress@gmail.com I will try to help. Do not give up on it because it is a great light weight vkeyboard plugin for WordPress.

    I got the same problem and I found a solution.

    Problem:
    With WordPress, the submit button has its attribute name set to ‘submit’.Thus this prevents self.VKI_target.form.submit() to work because doing this, means accessing to the input element whose name is “submit”. Then it doesn’t submit the form. But setting the name to “someName” or “” makes it works!

    Solution:
    Edit virtualkeyboard.php and then replace the following lines by:

    case "Enter":
                        VKI_addListener(td, 'click', function() {
                          if (self.VKI_target.nodeName != "TEXTAREA") {
                            if (self.VKI_target.form) {
                              for (var z = 0, subm = false; z < self.VKI_target.form.elements.length; z++) {
                                if (self.VKI_target.form.elements[z].type == "submit") {
    			      subm = true;
    			      self.VKI_target.form.elements[z].name = "";
    			    }
                              }
    			  if (subm) {
                                var frm = self.VKI_target.form;
                                self.VKI_close();
    			    frm.submit();
    			  }
    			}
                          } else self.VKI_insert("\n");
                          return true;
                        }, false);
                        break;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Virtual Keyboard] enter key does not submit the form’ is closed to new replies.