When using Redactor in a jQueryUI dialog which also contains an input element it exhibits some strange behavior.
Selecting the text and clicking the “Bold”, “Italics” or “Strike-through” buttons for the first time will not perform the expected action, it will instead transfer focus to the input element. A second click of the same button (after selecting the text again) will work as expected.
Removing the input also seems to work.
Fiddle: http://jsfiddle.net/Shikiju/sgvdvoL2/1/
Browser used: Chrome Version 40.0.2214.115 m
<div id="dialog">
<textarea id="editor" value=""></textarea>
<input type="text" value="" onfocus="console.log('Focus on this input')" />
</div>
$(function(){
$('#dialog').dialog({
open: function(){
$('#editor').redactor();
}
});
});