Telerik RadEditor 对话框在随机元素中渲染
请参阅此屏幕截图:
http://img200.imageshack.us/img200/3349/radeditorweirdness。 radEditor
对话框正在我的母版页上的表单中呈现。我一生都无法弄清楚为什么......
它不会尝试在 DOM 上的某个地方渲染比我的母版页更“本地”的地方?
应该指出的是,这才刚刚开始发生......我已经更改了整个网站加载的一些样式......但没有任何会影响 radEditor。我还仔细检查了我的所有样式是否正确且没有损坏。我想不出其他什么了? Firebug 根本不报告任何问题。
我还应该提到这个特定页面上有 3 个表单。 1 在母版页(正在渲染的位置)中,2 在内容页中(RadEditor 仅包含在其中之一中)。
任何帮助将不胜感激。
服务器端是 ASP.NET MVC 3 (Razor)
问候,
chem
Please see this screenshot:
http://img200.imageshack.us/img200/3349/radeditorweirdness.jpg
The radEditor dialogs are rendering within a form on my master page.. and I can't for the life of me figure out why..
Wouldn't it try and render somewhere up the DOM that was more "local" to it than in my master page?
It should be noted that this only just started happening.. I've changed some styles that are loaded throughout my site... but nothing that would affect the radEditor. I've also double checked that all of my styles are correct and not broken.. I can't think of anything else? Firebug doesn't report any issues at all.
I should also probably mention that there are 3 forms on this particular page. 1 in the master page (where it is being rendered), and 2 in the content page (the RadEditor is contained in only one of them).
Any help would be appreciated.
Server side is ASP.NET MVC 3 (Razor)
Regards,
chem
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此行为是设计使然 - 编辑器对话框和模式叠加将呈现为 ASP.NET 表单标记上的最后一个元素。这样做是为了防止对渲染实际 RadEditor 控件的页面内部可能存在的 CSS 样式产生任何干扰 - 假设表单标签是最外层带有 runat="server" 的标签页面的正文。由于这些是绝对定位的元素,因此它们在 DOM 树中的位置对于它们的实际位置并不重要。此外,应该使用编辑器正确处理元素,这样它们在页面卸载后就不会被遗留下来。
This behavior is by design - the editor dialogs and the modal overlay will be rendered as the last elements on the ASP.NET form tag. This is done to prevent any interference with CSS styles you might have in the inner parts of the page where the actual RadEditor control is rendered - it is assumed that the form tag is the outer-most tag with runat="server" you have in the body of the page. Since these are absolutely positioned elements, their place in the DOM tree is not important for their actual position. Furthermore, the elements should be disposed correctly with the editor, so they will not be left over after the page is unloaded.
我向 Telerik 提交了一份错误报告,他们已确认这是在处理其控件时出现 RestrictedZone 的原因。您可以定义一个“限制区域”,RadWindow 不会在该区域内渲染。
我在网上找不到任何地方..所以如果其他人遇到这个问题..那就是答案!
化学
I submitted a bug report to Telerik, who have confirmed this is the reason for RestrictedZone's when dealing with their controls. You can define a "restricted zone", and the RadWindow's won't render within that area.
I could not find that online anywhere.. so if anyone else gets this problem.. thats the answer!
chem