如何检测tinyMCE文本区域模糊/焦点事件?
我正在处理现有项目。当我点击网页上的一些可编辑文本时,它会变成文本区域并出现tinyMCE工具栏。当我在该文本区域之外单击时,工具栏就会消失。我想在 textarea 失去焦点并希望自动提交表单时获得该事件。
我无法捕获该 focusout
事件。只有 mouseout
事件有效,但效果不好,因为当我们移出文本区域时,每次都会提交表单并刷新页面。
$('.module-container form').live("mouseout", function() { // blur/focusout not working here. even ".module-container form textarea" selector not working
alert('outside');
});
那么如何捕获tinyMCE textarea focusout
事件。有什么想法吗?
谢谢
I am working on existing project. When I click some editable text on webpage, it becomes textarea and tinyMCE tool bar appears. When I click outside that textarea then toolbar disappears. I want to get that event when textarea lost focus and want to submit the form automatically.
I am unable to capture that focusout
event. Only mouseout
event is working but it is not good because as we move outside textarea, form is submitted and page is refreshed each time.
$('.module-container form').live("mouseout", function() { // blur/focusout not working here. even ".module-container form textarea" selector not working
alert('outside');
});
So how to capture tinyMCE textarea focusout
event. Any Idea ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试:
Try:
一个简单的方法是
An easy approach is