Commit cd2d32c8 authored by jrockowitz's avatar jrockowitz
Browse files

Issue #3257966 by jrockowitz: hideonesc plugin does not work on IE11

parent 3cff1c9d
......@@ -26,10 +26,15 @@
// Hide on escape.
// @see https://atomiks.github.io/tippyjs/v6/plugins/#hideonesc
//
// Converted from ES6 to ES5.
// @see https://babeljs.io/repl/
var hideOnEsc = {
name: 'hideOnEsc',
defaultValue: true,
fn({hide}) {
fn: function fn(_ref) {
var hide = _ref.hide;
function onKeyDown(event) {
if (event.keyCode === 27) {
hide();
......@@ -37,14 +42,14 @@
}
return {
onShow() {
onShow: function onShow() {
document.addEventListener('keydown', onKeyDown);
},
onHide() {
onHide: function onHide() {
document.removeEventListener('keydown', onKeyDown);
},
}
};
},
}
};
$(context).find('.js-webform-element-help').once('webform-element-help').each(function () {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment