【问题标题】:Making the window draggable outside boundary使窗口可拖动到边界外
【发布时间】:2012-08-31 05:06:55
【问题描述】:

ExtJS 4

我的 ExtJS 网页有一个桌面布局结构。该页面不可滚动。我们有可以点击的图标打开不同的 Ext.Windows。

当我将窗口拖到浏览器边界之外时,问题就来了。窗口被完美地拖动,但随后浏览器滚动条出现滚动页面,以便我可以查看整个窗口。无论如何我都不想滚动网页。

This is happening
~~~~~~~~~~~~~~~~~~~~~~~~
|~~~~~~~~~~~~~~~~      |
||              |<-----+--- desktop
||            -window- |
||           |  |    | |
||            --+----- |
||              |  <---|--- unwanted white space
|| <--taskbar-> |      |
|~~~~~~~~~~~~~~~~      |
|   <--scroll bar-->   |<---- webpage
~~~~~~~~~~~~~~~~~~~~~~~~


This is needed
~~~~~~~~~~~~~~~~~~
|~~~~~~~~~~~~~~~~|
||           <--++--- desktop
||            -window-
||           | A|| B |
||            --++----
||              ||
||  <-taskbar-> ||<--- webpage
|~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~
A = window part to be shown
B = window part to be cropped

只是我想修复我的视口,不管窗口是否被拖到边界之外。

怎么做?

我希望它现在清楚了。

【问题讨论】:

    标签: extjs window extjs4 draggable


    【解决方案1】:

    我解决了这个问题。我们可以从浏览器中移除滚动条。

    document.documentElement.style.overflow = 'hidden';  // firefox, chrome
    document.body.scroll = "no"; // ie only
    

    在 Firefox 中,它工作正常。 但在 IE-7 中出现问题。检查this

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-07
      • 2016-07-03
      • 1970-01-01
      • 2022-11-25
      相关资源
      最近更新 更多