fixing bug that requires to click twice to make it full screen:

see in example the "toggle FullScreen" button, after using it once, close the full screen mode and click it again