Hello,
Following is the html and script for two div element that has editable div. when clicking on Edit icon it focus the editor's instance for the selected div. This is working fine in my development environment but when i host it on IIS it gets stuck in ckeditor.focus(); in the script below.
Am I missing some configuration on ISS?
HTML
<div class="block" style="background: #efefef; width: 100%;">
<div class="block-overlay">
<nav class="nav-right">
<a class="trigger-block-edit p-cleft"><span class="hint">Edit</span><span class="edit"></span></a>
<a class="trigger-block-delete p-cright"><span class="hint">Delete</span><span class="delete"></span></a>
</nav>
</div>
<div id="editable1" contenteditable="true">
Editable area 1.
</div>
</div>
<div class="block" style="background: #efefef; width: 100%;">
<div class="block-overlay">
<nav class="nav-right">
<a class="trigger-block-edit p-cleft"><span class="hint">Edit</span><span class="edit"></span></a>
<a class="trigger-block-delete p-cright"><span class="hint">Delete</span><span class="delete"></span></a>
</nav>
</div>
<div id="editable2" contenteditable="true">
Editable area 2.
</div>
</div>
script
<script src="../../ckeditor/ckeditor.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.trigger-block-edit').live("click", function () {
var editableArea = $(this).closest('.block').find('.block-content')[0];
for (var editor in CKEDITOR.instances) {
var ckeditor = CKEDITOR.instances[editor];
if (ckeditor.container.$ == editableArea) {
// Focus ckeditor istance
ckeditor.focus();
//CKEDITOR.instances[editor].focus();
break;
}
}
});
});
</script>