调整浏览器大小时模块中的组件消失(Flex 3)
我们在 Builder 3 上构建了这个 Flex 应用程序,并使用 FlexLib 中的 SuperTabNavigator 来显示一些模块。 问题是,每当用户调整浏览器窗口大小时,任何打开的选项卡上的所有内容都会消失,并且无法恢复。 这种情况只发生在第一次,因此,如果您关闭这些“损坏的”选项卡并重新打开它们,您可以调整所需的大小,但您仍然丢失了在其中所做的所有操作,这是不可接受的。 我做了一些测试,发现发生这种情况时该选项卡中的模块不会调度调整大小事件。 它在打开时分派(所有内容都设置为 100% 以适应浏览器窗口,因此它在启动时调整大小),并且每次您调整大小时都不会“破坏”它。 事情变得更奇怪了。 我还发现,只要将其大小调整为大于原始大小(即在恢复然后最大化的浏览器窗口中打开它),调整大小就可以完美地工作,但即使在这样做之后,如果您更改其大小回到比原来小一个像素的东西,模块就会消失。 其他一切都保持完美的工作状态:选项卡外部的任何组件和选项卡本身都可以工作,但是(总结)在您第一次将浏览器窗口大小调整为小于原始大小时打开的任何选项卡中的任何内容都会消失。
我知道这是一个奇怪的问题,希望你们中的一些人能够帮助我。 如果有任何不清楚的地方,请随时提出任何问题。
提前致谢。
We have this Flex app built on Builder 3 and we're using SuperTabNavigator from FlexLib to have some modules displayed. The thing is, whenever the user resizes the browser window all the contents on any tabs open simply disappear and there's no way to get them back. This only happens the first time, so if you close these 'broken' tabs and reopen them, you can resize all you want, but you still lost all you were doing in them and this is unacceptable. I've done some testing and found the module in that tab doesn't dispatch the resize events when this happens. It's dispatched when it opens (everything is set to 100% to fit the browser window, so it resizes on startup) and every other time you resize it without 'breaking' it. It gets weirder. I've also found that resizing works perfectly as long as you resize it to a size larger than the original (i.e. you open it in a browser window that is restored and then maximized), but even after doing that, if you change its size back to something even a pixel smaller than the original, the module just disappears. Everything else remains in perfect working conditions: any components outside tabs and the tabs itself work, but (summing up) anything within any tab open at the moment you first resize the browser window to a size smaller than the original just disappears.
I understand that this is a weird problem and hope some of you might be able to help me. Feel free to ask any questions if anything wasn't clear.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的应用程序也遇到了同样的问题。 该问题源于这样一个事实:当窗口大小小于其原始大小时,将触发RemovedFromStage 事件。 我正在捕获RemovedFromStage事件并隐藏我的组件,这导致了这种行为。 可以在此处找到更详细的说明。
I had this exact same problem with my application. The issue stemmed from the fact that the RemovedFromStage event was being fired when the window was sized smaller than its original size. I was catching the RemovedFromStage event and hiding my component, which resulted in this behavior. A more detailed explanation can be found here.