mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
issue 978: Fixed a bug for resizing an image component
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9948 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7ebe2051a4
commit
540cd6fd37
5 changed files with 104 additions and 92 deletions
|
|
@ -2946,40 +2946,43 @@ xe.XE_EditingArea_WYSIWYG = $.Class({
|
|||
// this.getDocument().body.style.cursor = "text";
|
||||
|
||||
if($.browser.msie){
|
||||
$(this.doc).bind('keydown', $.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
$(this.doc)
|
||||
.unbind('keydown.ea')
|
||||
.bind('keydown.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
if(this.doc.selection.type.toLowerCase() == 'control' && weEvent.keyCode == 8) {
|
||||
this.oApp.exec("EXECCOMMAND", ['delete', false, false]);
|
||||
weEvent.preventDefault(); weEvent.stopPropagation();
|
||||
}
|
||||
}
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('mousedown', $.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('beforedeactivate', $.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
, this));
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
$(this.doc.body)
|
||||
.unbind('mousedown.ea')
|
||||
.bind('mousedown.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
this._oIERange = null;
|
||||
this._bIERangeReset = true;
|
||||
}
|
||||
}
|
||||
, this));
|
||||
$(this.doc.body).bind('mouseup', $.fnBind(
|
||||
function(weEvent){
|
||||
this._bIERangeReset = false;
|
||||
}
|
||||
, this));
|
||||
, this))
|
||||
.unbind('beforedeactivate.ea')
|
||||
.bind('beforedeactivate.ea', $.fnBind(
|
||||
function(weEvent){
|
||||
// without this, cursor won't make it inside a table.
|
||||
// mousedown(_oIERange gets reset) -> beforedeactivate(gets fired for table) -> RESTORE_IE_SELECTION
|
||||
if(this._bIERangeReset) return;
|
||||
|
||||
var tmpRange = this.getDocument().selection.createRange(0);
|
||||
// Control range does not have parentElement
|
||||
if(tmpRange.parentElement && tmpRange.parentElement() && tmpRange.parentElement().tagName == "INPUT"){
|
||||
this._oIERange = this._oPrevIERange;
|
||||
}else{
|
||||
this._oIERange = tmpRange;
|
||||
}
|
||||
}
|
||||
, this))
|
||||
.unbind('mouseup.ea')
|
||||
.bind('mouseup.ea', $.fnBind( function(weEvent){ this._bIERangeReset = false;}, this));
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -5249,7 +5252,7 @@ xe.XE_Extension = $.Class({
|
|||
obj.attr('editor_component','image_link');
|
||||
}
|
||||
if(this.last_doc != doc) {
|
||||
obj.dblclick(fn);
|
||||
obj.unbind('dblclick.widget').bind('dblclick.widget',fn);
|
||||
this.last_doc = doc;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue