Merged BRANCHES/DEV/BELARUS/HEAD-2010_01_11 to HEAD (with modifications)

18309: ALF-514 & ALF-775: Changes not being applied during online modification of Web Content in WebKit based browsers


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19817 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2010-04-12 12:05:40 +00:00
parent 2bf2fc4d91
commit c6ac8d8243

View File

@@ -934,8 +934,18 @@ alfresco.xforms.RichTextEditor = alfresco.xforms.Widget.extend({
tinyMCE.execCommand("mceAddControl", false, this.widget.id) tinyMCE.execCommand("mceAddControl", false, this.widget.id)
var editorDocument = tinyMCE.get(this.widget.id).getDoc(); var editorDocument = tinyMCE.get(this.widget.id).getDoc();
editorDocument.widget = this; editorDocument.widget = this;
if (navigator.userAgent.contains('Safari'))
{
// ETHREEOH-2568 bug fixing
this.domNode.onmouseout = this._tinyMCE_blurHandler.bindAsEventListener(this);
}
else
{
tinymce.dom.Event.add(editorDocument,window.ie ? "mouseout" : "blur", tinymce.dom.Event.add(editorDocument,window.ie ? "mouseout" : "blur",
this._tinyMCE_blurHandler); this._tinyMCE_blurHandler);
}
tinymce.dom.Event.add(editorDocument, "focus", this._tinyMCE_focusHandler); tinymce.dom.Event.add(editorDocument, "focus", this._tinyMCE_focusHandler);
this._created = true; this._created = true;
}, },
@@ -1053,11 +1063,24 @@ alfresco.xforms.RichTextEditor = alfresco.xforms.Widget.extend({
_tinyMCE_blurHandler: function(event) _tinyMCE_blurHandler: function(event)
{ {
var widget;
if (event.type == "mouseout") if (event.type == "mouseout")
{
if (window.ie)
{ {
event.target = event.srcElement.ownerDocument; event.target = event.srcElement.ownerDocument;
widget = event.target.widget;
} }
var widget = event.target.widget; else
{
widget = this;
}
}
else
{
widget = event.target.widget;
}
var value = widget.getValue(); var value = widget.getValue();
if (value != widget._oldValue) if (value != widget._oldValue)
{ {