Skip to content

Commit

Permalink
fix for #698
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Mar 16, 2021
1 parent 191cf6e commit 3536ca3
Show file tree
Hide file tree
Showing 3 changed files with 278 additions and 99 deletions.
16 changes: 8 additions & 8 deletions dist/PublicLab.Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20682,7 +20682,7 @@ function classify (group, classes) {
}

function prompt (options, done) {
var scrollSize = 0; // For window.scroll
var scrollSize = 0; // For window.scroll
var text = strings.prompts[options.type];
var dom = render({
id: 'wk-prompt-' + options.type,
Expand All @@ -20693,7 +20693,7 @@ function prompt (options, done) {
var domup;

crossvent.add(dom.cancel, 'click', remove);
crossvent.add(root, 'click', rootClick);
//crossvent.add(root, 'click', rootClick);
crossvent.add(dom.close, 'click', remove);
crossvent.add(dom.ok, 'click', ok);
crossvent.add(dom.input, 'keypress', enter);
Expand Down Expand Up @@ -20728,12 +20728,12 @@ function prompt (options, done) {
}

// function will be called when click any other place except the editor box and onClick it will remove the popup.
function rootClick (e) {
var editorClassList = e.target.classList.value;
if (!editorClassList.includes('wk-prompt')) {
remove();
}
}
// function rootClick (e) {
// var editorClassList = e.target.classList.value;
// if (!editorClassList.includes('wk-prompt')) {
// remove();
// }
// }

function enter (e) {
var key = e.which || e.keyCode;
Expand Down
Loading

0 comments on commit 3536ca3

Please sign in to comment.