When I am using an ExtJS ViewPort, when I resize my window manually by dragging the window handles everything goes out of size so I needed a way to detect the window resize then refreshed the window.
First we need to create a function to refresh the window. That can be done using window.location.reload function. In ExtJS you can look at the Ext.EventManager.onWindowResize to add a listener to the onWindowResize event. Code is below.
function resize(){
window.location.reload
}
Ext.EventManager.onWindowResize(resize);