[英]Jquery UI dialog and Tui "Toast UI image editor" - can't type text on image in popup
I am working on a big legacy project that uses Jquery UI 1.10.1 "dialog" functionality.我正在开发一个使用 Jquery UI 1.10.1“对话框”功能的大型遗留项目。 Now I implemented the TUI - Toast image editor https://github.com/nhnent/tui.editor现在我实现了 TUI - Toast 图像编辑器https://github.com/nhnent/tui.editor
Problem is that when writing text on images, it doesn't work but only when loaded into a dialog() popup.问题是在图像上写入文本时,它不起作用,但只有在加载到 dialog() 弹出窗口时才起作用。 When loaded directly in a div on the page, it just works as expected.当直接加载到页面上的 div 中时,它会按预期工作。
So the onKeyDown strokes just won't' come through in the canvas in a dialog popup...所以 onKeyDown 笔画不会在弹出对话框的画布中通过......
$('.image-editor-modal').dialog({
height: 800,
width: '90%',
modal: true,
autoOpen: false
});
Any ideas?有任何想法吗?
The problem was in the option "modal: true".问题出在选项“modal: true”中。 I had to leave that out and could type text again in the canvas.我不得不把它排除在外,可以在画布上再次输入文本。
From the documentation :从文档:
If set to true, the dialog will have modal behavior;如果设置为 true,则对话框将具有模态行为; other items on the page will be disabled, ie, cannot be interacted with.页面上的其他项目将被禁用,即无法与之交互。 Modal dialogs create an overlay below the dialog but above other page elements.模态对话框在对话框下方但在其他页面元素上方创建叠加层。
$('.image-editor-modal').dialog({
height: 800,
width: '90%',
autoOpen: false
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.