ie10 and lower full screen fix [Fixes #74391144]

Since this code is the same for the **if** and also the same for the **else** we should write it only once, outside of the conditional statements.