Cancel popups when clicking within an editor (#4658)

* Add cancelPopups attribute to edit widget

* Add cancelPopups attribute to factory.js

* Cancel popups in editor/simple.js

* Cancel popups on focus in engines/framed.js

* Cancel popups on focus in CodeMirror engine

* Add cancelPopups="yes" to tag-picker

* Add cancelPopups="yes" to sidebar search

* Add cancelPopups="yes" to editor

* Add cancelPopups="yes" to fields EditTemplate

* Update body.tid

* Add cancelPopups="yes" to title EditTemplate

* Add cancelPopups="yes" to type EditTemplate

* Update EditTextWidget.tid

* Update EditWidget.tid

* Add cancelPopups="yes" to menubar plugin search

* Update tag-picker.tid

* Update tags.tid
This commit is contained in:
Simon Huber
2020-06-11 12:41:35 +02:00
committed by GitHub
parent 042c8d8a69
commit e59f606566
16 changed files with 39 additions and 15 deletions

View File

@@ -128,6 +128,11 @@ function CodeMirrorEngine(options) {
this.cm.on("keydown",function(cm,event) {
return self.widget.handleKeydownEvent.call(self.widget,event);
});
this.cm.on("focus",function(cm,event) {
if(self.widget.editCancelPopups) {
$tw.popup.cancel(0);
}
});
}
/*