bringToFront doesn't maintain window maximized state if grabFocus is false

Issue Description:
When calling bringToFront with the grabFocus option set to false on a desktop window that is in a maximized state, the window will be restored to its non maximized size.

However, when grabFocus is set to true, the desktop window will be brought up in the correct maximized or normal state.

Can you reproduce it (exact steps to reproduce):

  • Open a desktop window
  • Maximize the window
  • call with grabFocus set to false (can just do this in the dev console)
  • the desktop window will return to its non-maximized state
  • maximize the window again
  • call the bringToFront api with grabFocus set to true
  • the desktop window will stay maximized

Impact for my app: low

Do you currently have a workaround?
Can set grabFocus to true, but that doesn’t seem to be the purpose of the grabFocus parameter

Hey @fgfl,

I was able to reproduce it. Not sure if it’s a bug or it’s by design. (there is some sense by NOT maximizing the window when grabFocus=false: if it will maximize it, then the only window you will be able to see is that window, and you don’t want to “grab the focus.”).

I will check it with our R&D and let you know.



After checking, I can confirm that it’s expected behavior. I will update the docs accordingly.


Hi eransharv,

Noted. I’ll use the grabFocus parameter then.


1 Like