View Full Version : Drag window out of displayarea

15 Oct 2010, 3:43 AM
Hi together,

i got a simple app with an window, it has no renderTo. Its just the hidden window.
On buttonclick i show or hide it.
It should be draggable, but its possible to drag it out of the browserwindowsize, but then cant be dragged back, as the titlebar is out of the displayarea of the browser... any way to avoid this?

Thanks a lot,

15 Oct 2010, 3:53 AM
OK solved it on my own :)
for those who'd like to know:

initDraggable : function(){
this.dd = new Ext.Window.DD(this);
this.dd.onDrag = function(e){
this.alignElWithMouse(this.proxy, e.getPageX(), Math.max(100+this.deltaY, e.getPageY()));

15 Oct 2010, 5:15 AM
Have you tried just using the config option for the window

constrain: true


constrainHeader: true