You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced a bug when using the Keyboard plugin alongside Prototype.js. I thought I would put my solution here, in case anyone else has the same problem in the future.
Prototype was giving the following error: "Uncaught TypeError: eventName.include is not a function"
I tracked the error down to following line of code inside the 'base.close' method of the Keyboard plugin: .trigger((o.alwaysOpen) ? '' : kbevents.kbBeforeClose, [base, base.el, (accepted || false)])
The reason Prototype was throwing the error was because of the empty string event (the error only happens when alwaysOpen is set to true).
To fix the error I just added another event called 'nullEvent' to the $keyboard.events object.
Then I modified your line of code like this: .trigger((o.alwaysOpen) ? kbevents.nullEvent : kbevents.kbBeforeClose, [base, base.el, (accepted || false)])
There might be a better solution, but this seemed to work for me. The main point is the Prototype does not like the event being an empty string.
Hope it helps someone in the future.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue. I'll have a fix applied to the master branch here shortly. If you are using a package system, it won't be available until the next release.
I experienced a bug when using the Keyboard plugin alongside Prototype.js. I thought I would put my solution here, in case anyone else has the same problem in the future.
Prototype was giving the following error:
"Uncaught TypeError: eventName.include is not a function"
I tracked the error down to following line of code inside the 'base.close' method of the Keyboard plugin:
.trigger((o.alwaysOpen) ? '' : kbevents.kbBeforeClose, [base, base.el, (accepted || false)])
The reason Prototype was throwing the error was because of the empty string event (the error only happens when alwaysOpen is set to true).
To fix the error I just added another event called 'nullEvent' to the $keyboard.events object.
Then I modified your line of code like this:
.trigger((o.alwaysOpen) ? kbevents.nullEvent : kbevents.kbBeforeClose, [base, base.el, (accepted || false)])
There might be a better solution, but this seemed to work for me. The main point is the Prototype does not like the event being an empty string.
Hope it helps someone in the future.
The text was updated successfully, but these errors were encountered: