Redactor.js jQuery UI对话框焦点问题(Redactor.js jQuery UI dialog focus issue)

编程入门 行业动态 更新时间:2024-10-17 13:38:22
Redactor.js jQuery UI对话框焦点问题(Redactor.js jQuery UI dialog focus issue)

在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

本文发布于:2023-08-07 05:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1462697.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:对话框   焦点   jQuery   Redactor   js

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!