在jQueryUI对话框中使用Redactor时,它还包含一个输入元素,它表现出一些奇怪的行为。
选择文本并首次单击“粗体”,“斜体”或“穿透”按钮将不会执行预期的操作,而是将焦点转移到输入元素。 再次单击同一按钮(再次选择文本后)将按预期工作。
删除输入似乎也有效。
小提琴: http : //jsfiddle.net/Shikiju/sgvdvoL2/1/
使用的浏览器:Chrome版本40.0.2214.115米
<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(); } }); });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(); } }); });最满意答案
显然,这是Jquery UI中的一个问题,导致了这个问题。 解决了
https://stackoverflow.com/a/4814001/611547
Apperantly it was a issue in Jquery UI that caused the problem. Solved by
https://stackoverflow.com/a/4814001/611547
更多推荐
text,dialog,输入,input,电脑培训,计算机培训,IT培训"/> <meta name="descript
发布评论