mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-17 07:11:22 +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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -8,7 +8,7 @@ tags: $:/tags/MenuBar
|
||||
|
||||
<span style="margin: 0 0.5em;">
|
||||
|
||||
<$edit-text tiddler=<<searchTiddler>> tag="input" type="search" focusPopup="$:/state/popup/menubar-search-dropdown" class="tc-popup-handle tc-menu-show-when-wide" placeholder="Search..." default=""/>
|
||||
<$edit-text tiddler=<<searchTiddler>> tag="input" type="search" focusPopup="$:/state/popup/menubar-search-dropdown" class="tc-popup-handle tc-menu-show-when-wide" placeholder="Search..." default="" cancelPopups="yes"/>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user