问题
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