Fixed IME in editor
This commit is contained in:
parent
68cce3a472
commit
61e472d7f0
@ -43,9 +43,12 @@ define([
|
||||
pagedownEditor = pagedownEditorParam;
|
||||
});
|
||||
|
||||
var isComposing;
|
||||
eventMgr.addListener('onSectionsCreated', function(newSectionList) {
|
||||
updateSectionList(newSectionList);
|
||||
highlightSections();
|
||||
if(!isComposing) {
|
||||
updateSectionList(newSectionList);
|
||||
highlightSections();
|
||||
}
|
||||
if(fileChanged === true) {
|
||||
// Refresh preview synchronously
|
||||
pagedownEditor.refreshPreview();
|
||||
@ -727,6 +730,14 @@ define([
|
||||
clearNewline = false;
|
||||
}
|
||||
})
|
||||
.on('compositionstart', function() {
|
||||
isComposing = true;
|
||||
console.log('compositionstart');
|
||||
})
|
||||
.on('compositionend', function() {
|
||||
isComposing = false;
|
||||
console.log('compositionend');
|
||||
})
|
||||
.on('mouseup', _.bind(selectionMgr.saveSelectionState, selectionMgr, true))
|
||||
.on('paste', function() {
|
||||
undoMgr.currentMode = 'paste';
|
||||
|
Loading…
Reference in New Issue
Block a user