This used to work but not now:
I stacked up a bunch of HTML <div>s to cover all or part of the game canvas for loading, title, debug screens. They are display:none until I need them. But now no matter what z-index or display values, they are hidden behind the game’s canvas.
Canvas is supposed to be lowest z-index but acts like the highest
Thank you Samme.
I found it and found that it had this property transform: none !important;
I have read that both transform and opacity will elevate an element higher than its z-index deserves. So I set that property on all my divs.! But no joy.
I can manipulate the canvas in the DOM inspector but I cannot get it to display beneath other divs. Am I fighting Phaser? Any idea?
But I just found the bug
9 hours of my life I’ll never get back. But maybe I can save somebody else the frustration!
Bug:
My game plays in fullscreen mode.
A fullscreen request must be made by a legit HTML element in response to a user action.
I called the method on the game div that holds the canvas.
That was dumb.
It caused the game div to assert domination over the whole screen while in fullscreen mode.
The problem looked like z-index, but was actually more screwed up than that.