how to fix window in it's absolute position and don't scroll on browser scroll?

坚强是说给别人听的谎言 提交于 2019-12-13 04:49:23

问题


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 Configure as true to have this Component fixed at its X, Y coordinates in the browser viewport, immune to scrolling the document.

Defaults to: 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?


回答1:


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();
                            }



回答2:


Like this maybe:

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

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


来源:https://stackoverflow.com/questions/33911019/how-to-fix-window-in-its-absolute-position-and-dont-scroll-on-browser-scroll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!