Extlib 对话框似乎固定在右窗口边框上 [英] Extlib dialog appears to be pinned to the right window border

查看:29
本文介绍了Extlib 对话框似乎固定在右窗口边框上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 extlib 对话框中遇到了这种奇怪的现象,这是我以前从未遇到过的.这个场景非常简单:有一个链接控件通过它的服务器端 conclick 事件调用 dialog.show() 方法.然而,一旦对话框出现,它就会以某种方式到浏览器窗口的右边缘.向左拖动对话框实际上并没有移动它,而是增加了它的宽度!

I'm having this strange phenomenon with an extlib dialog which I've never encountered before. The scenario is pretty much straight-forward: there's a link control calling the dialog.show() method through it's serverside conclick event. As soon as the dialog appears, however, it somehow is glued to the right edge of the browser's window. Dragging the dialog to the left doesn't actually move it but increases its width instead!

通过萤火虫查看源代码,我看不出有什么特别之处.AFAIK 这个应用程序只有一件事特别:有问题的 Xpage 在经典框架集内运行,因为这是一个已有 10 年历史的 Domino Web 应用程序,而且根本没有预算将其完全转换为 XSP 逻辑,所以我正在一个一个地进行要求进行一些调整.

I can't see anything special at all looking at the source code through firebug. AFAIK there's only one thing special about this application: the Xpage in question is running inside a classical frameset, due to the fact that this a 10 year old Domino web application, and there's simply no budget to completely transform it to XSP logic, so I'm doing it one by one I'm asked for some adjustments.

到目前为止,这个组合运行得很好,到目前为止没有任何缺陷,我完全不确定这是否与另一个有关.

Up to now this combination runs just great, no flaws so far until now, and I'm not at all sure if the one has something to do with the other.

在 Firefox 和 MSIE 中都会发生.我在 8.5.3 UP1 和 9.0.1 版本的服务器上尝试了这个.设计器版本为 9.0.1.

Happens in both Firefox and MSIE. I tried this on servers of version 8.5.3 UP1 as well as 9.0.1. Designer version is 9.0.1.

目前,我通过向对话框添加一些右边距来解决这个问题,因此至少它出现在调用它的框架的某处.但它仍然固定在某个右边缘.

Currently, I worked around this by adding some right margin to the dialog, so at least it appears somewhere inside the frame from where it is called. But it still is pinned to some right edge.

欢迎任何提示.

与此同时,我尝试了工具提示对话框而不是标准对话框:再次出现的结果控件固定在右边缘,但它也跨越整个父框架.应该指向唤起链接的工具提示标记也指向最右边的可能位置.所以现在对我来说显然这些控件不喜欢在框架集的上下文中被调用.或者可能是这样?

Meanwhile I tried a tooltip dialog instead of a standard one: again the resulting control appears is pinned to the right edge, but it also spans across the entire parent frame. And the tooltip marker that should be pointing to the evoking link also is pointing to the rightmost possible position. So it's obviously for me now that those controls don't like to be called in the context of a frameset. Or could that be so?

编辑 #2:

感谢帕特里克和迈克尔,我有了更多可以尝试的想法.它仍然没有按预期工作,但至少我现在可以肯定地说周围的框架集不是这一切的原因:在带有框架集的空白数据库中,所有对话框都按预期工作.而即使我自己调用页面,该对话框在我的项目数据库中也不起作用.
我刚刚发现的最奇怪的事情是,如果我在 firefox 中运行页面 AND 并打开 firebug 拆分窗口,那么对话框的行为就像我想要的那样拖动它.

Thanks to Patrick and Michael I had a few more ideas what I could try. It's still not working as expected, but at least I can now say for sure that the surrounding frameset is not the reason for this all: in a blank db with frameset and all the dialog works as expected. Whereas the dialog doesn't work in my project db even if I call the page by its own.
Weirdest thing I just found out is if I run the page in firefox AND with the firebug split window open then the dialog behaves just normally as I can drag it around like I want to.

推荐答案

终于找到了解决方案;原因是对话框的内容:

Finally I found the solution; the reason was the dialog's content:

在我的情况下,对话框包含仅通过一些原生 htmlp"和ul"标签结构化的固定文本.生成的文本内容呈现为每个结构标签的一个长字符串;自动换行发生在对话框容器到达右窗口边界的地方,但实际上文本想要伸展整个字符串的长度.所以对话框似乎固定在右边缘,如果我把它拖到左边,它只会增加它的宽度.如果我的屏幕足够宽,对话框最终会在某个时候变得可拖动,但不幸的是文本太长了(希望我能说清楚).

in my case the dialog contains fixed text only structured through some native html "p" and "ul" tags. The resulting text content is rendered as one long string per structure tag; word-wrapping occurs where the dialog container reaches the right window border, but in fact the text would like to stretch out for the entire string's length. So the dialog appears to be pinned to the right edge, and if I drag it to the left it simply increases its width. If my screen was wide enough the dialog finally would become draggable at some point, but unfortunately the text is too long for that (hope I could make myself clear).

解决方案非常简单:为对话框容器控件提供一个样式属性,将其初始宽度限制为 60% 即可解开谜团.

Solution is as simple as it can be: giving the dialog container control a style attribute restricting its initial width to say 60% solves the mystery.

这篇关于Extlib 对话框似乎固定在右窗口边框上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆