Commit ee406ba3 authored by campaign's avatar campaign

by zhanyi

parent fc92e76f
...@@ -110,6 +110,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { ...@@ -110,6 +110,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
return false return false
} }
me.on( 'keydown', function ( e ) { me.on( 'keydown', function ( e ) {
var originEvent = e.originEvent; var originEvent = e.originEvent;
var keyCode = originEvent.keyCode || originEvent.which; var keyCode = originEvent.keyCode || originEvent.which;
for ( var i in shortcutkeys ) { for ( var i in shortcutkeys ) {
...@@ -120,10 +121,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { ...@@ -120,10 +121,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
current++; current++;
} }
}); });
//todo 暂时通过receiver判断
if(me.isTextEditStatus()){
return;
}
if(current == keys.length){ if(current == keys.length){
if ( me.queryCommandState( i ) != -1 ) if ( me.queryCommandState( i ) != -1 )
me.execCommand( i ); me.execCommand( i );
......
...@@ -183,6 +183,9 @@ KityMinder.registerModule( "TextEditModule", function () { ...@@ -183,6 +183,9 @@ KityMinder.registerModule( "TextEditModule", function () {
} }
receiver.clear().setTextEditStatus(false); receiver.clear().setTextEditStatus(false);
if(this.getStatus() == 'textedit'){
this.setStatus('normal')
}
}, },
'selectionclear':function(){ 'selectionclear':function(){
km.setStatus('normal'); km.setStatus('normal');
......
...@@ -3,6 +3,7 @@ Minder.Receiver = kity.createClass('Receiver',{ ...@@ -3,6 +3,7 @@ Minder.Receiver = kity.createClass('Receiver',{
clear : function(){ clear : function(){
this.container.innerHTML = ''; this.container.innerHTML = '';
this.selection && this.selection.setHide(); this.selection && this.selection.setHide();
this.range && this.range.nativeSel.removeAllRanges();
this.index = 0; this.index = 0;
return this; return this;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment