How to capture maximize button event?

Have two Windows next to next and both has maximize button and when i maximize the first it goes behind the second window.

How to capture maximize button event and make that window overlap on others so it is visible and once it is minimized it defaults.

Thanks.

Hello Subashk,

Use bringToFront() to control stacking order.

The maximize button calls window.maximize() - override that to add custom behavior.

Remember that the documentation is searchable. Window.maximize is the first hit for a search for “maximize”. Any attempt to search for something like “front” or “behind” hits the right methods for controlling zIndex. You can get much faster answers from documentation search than here.