如何修复窗口中的绝对位置,不要滚动浏览器滚动? [英] how to fix window in it's absolute position and don't scroll on browser scroll?

查看:315
本文介绍了如何修复窗口中的绝对位置,不要滚动浏览器滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在ExtJS中,当我滚动浏览器窗口Ext.window.window保持在Viewport上相同的位置。我想修复这个窗口是绝对的位置。

我看到文档说:

In ExtJS when I scroll browser window Ext.window.window stays on same position on Viewport. I would like to fix this window on it's absolute position.
I saw documentation says:


fixed:Boolean
配置为true,使此组件固定在浏览器视口中的X,Y坐标,免于滚动文档。

fixed : Boolean Configure as true to have this Component fixed at its X, Y coordinates in the browser viewport, immune to scrolling the document.

默认为:false

但不适合我。我失踪了如何修复窗口的绝对位置,不滚动浏览器滚动?

But does not work for me. What I am missing? How to fix window in it's absolute position and don't scroll on browser scroll?

推荐答案

这部分工作。但是你仍然担心约束吗?

This part works. But still, are you concerned about constrain?

 handler: function(button){
                                var w = Ext.create('Ext.window.Window', {
                                    height: 150,
                                    width: 200,                                        
                                    renderTo: button.up('fieldset').getEl().dom,
                                    title: 'child window'                                      
                                });

                                this.up('fieldset').add(w);
                                w.show();
                            }

这篇关于如何修复窗口中的绝对位置,不要滚动浏览器滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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