Keyboard-driven dropdown inputs (#4725)

* Add shortcut descriptions to Misc.multids

* Update framed.js

* Update simple.js

* Add inputActions and refreshTitle to factory.js

* Add inputActions and refreshTitle to edit.js

* Update DefaultSearchResultList.tid

* Update search.tid

* Update ShortcutInfo.multids

* Update shortcuts.multids

* Create keyboard-driven-input.tid

* Update tag-picker.tid

* Create keyboard-driven-input_Macro.tid

* Update EditTextWidget.tid

* Update EditWidget.tid

* Update engine.js

* Update base.tid

* Use primaryListFilter, secondaryListFilter, primaryList and secondaryList

* Update tag-picker.tid

* Update search.tid

* Update DefaultSearchResultList.tid

* Update keyboard-driven-input_Macro.tid

* Fix typo udpate -> update

* Update framed.js
This commit is contained in:
Simon Huber
2020-07-13 18:42:55 +02:00
committed by GitHub
parent d505eeb269
commit 0d2df34c58
16 changed files with 244 additions and 49 deletions

View File

@@ -120,6 +120,9 @@ function CodeMirrorEngine(options) {
// Set up a change event handler
this.cm.on("change",function() {
self.widget.saveChanges(self.getText());
if(self.widget.editInputActions) {
self.widget.invokeActionString(self.widget.editInputActions);
}
});
this.cm.on("drop",function(cm,event) {
event.stopPropagation(); // Otherwise TW's dropzone widget sees the drop event
@@ -142,10 +145,17 @@ CodeMirrorEngine.prototype.setText = function(text,type) {
var self = this;
self.cm.setOption("mode",type);
if(!this.cm.hasFocus()) {
this.cm.setValue(text);
this.updateDomNodeText(text);
}
};
/*
Update the DomNode with the new text
*/
CodeMirrorEngine.prototype.updateDomNodeText = function(text) {
this.cm.setValue(text);
};
/*
Get the text of the engine
*/