* Re-attach events when switching between menu
This commit is contained in:
parent
eea09dd3b3
commit
52288a6162
|
@ -1052,7 +1052,7 @@ MultiLineEditTextView.prototype.setText = function(text) {
|
|||
//this.textLines = [ { text : '' } ];
|
||||
//this.insertRawText('');
|
||||
//text = "Tab:\r\n\tA\tB\tC\tD\tE\tF\tG\r\n reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally long word!!!";
|
||||
text = require('fs').readFileSync('/home/nuskooler/Downloads/test_text.txt', { encoding : 'utf-8'});
|
||||
text = require('fs').readFileSync('/home/bashby/Downloads/test_text.txt', { encoding : 'utf-8'});
|
||||
|
||||
this.insertRawText(text);//, 0, 0);
|
||||
this.cursorEndOfDocument();
|
||||
|
|
21
mods/fse.js
21
mods/fse.js
|
@ -231,19 +231,25 @@ function FullScreenEditorModule(options) {
|
|||
}
|
||||
};
|
||||
|
||||
this.observeEditEvents = function() {
|
||||
var bodyView = self.getBodyView();
|
||||
|
||||
bodyView.on('edit position', function cursorPosUpdate(pos) {
|
||||
self.updateEditModePosition(pos);
|
||||
});
|
||||
|
||||
bodyView.on('text edit mode', function textEditMode(mode) {
|
||||
self.updateTextEditMode(mode);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
this.menuMethods = {
|
||||
headerSubmit : function(formData, extraArgs) {
|
||||
self.viewControllers.header.setFocus(false);
|
||||
self.viewControllers.body.switchFocus(1);
|
||||
|
||||
self.getBodyView().on('edit position', function cursorPosUpdate(pos) {
|
||||
self.updateEditModePosition(pos);
|
||||
});
|
||||
|
||||
self.getBodyView().on('text edit mode', function textEditMode(mode) {
|
||||
self.updateTextEditMode(mode);
|
||||
});
|
||||
self.observeEditEvents();
|
||||
},
|
||||
editModeEscPressed : function(formData, extraArgs) {
|
||||
console.log('editorModeBefore=' + self.editorMode)
|
||||
|
@ -261,6 +267,7 @@ function FullScreenEditorModule(options) {
|
|||
self.viewControllers.footerEditMenu.setFocus(false);
|
||||
}
|
||||
self.viewControllers.body.switchFocus(1);
|
||||
self.observeEditEvents();
|
||||
break;
|
||||
|
||||
case 'editMenu' :
|
||||
|
|
Loading…
Reference in New Issue