1

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();
        }
    });
});
Shikiju
  • 722
  • 2
  • 9
  • 18

1 Answers1

0

Apperantly it was a issue in Jquery UI that caused the problem. Solved by

https://stackoverflow.com/a/4814001/611547

Community
  • 1
  • 1
Shikiju
  • 722
  • 2
  • 9
  • 18