mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-27 18:34:50 +00:00
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:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user