Sets the layer's zIndex to the current maximum zIndex plus 1 and re-sorts
allLayers, so the layer moves to the top visually and wins keyboard and
mouse priority. The layer object is replaced via spread — its elements,
regionFocus, hostPage and crossPage references are kept, so the
layer's element components do not remount and no user state is lost.
No-op when the layer is already the top layer. Modal layers are
unaffected: they live in a separate array that always renders (and takes
keyboard/mouse priority) above regular layers, so a raised regular layer
never overtakes a modal.
Raise a regular layer above all other layers.
Sets the layer's zIndex to the current maximum zIndex plus 1 and re-sorts
allLayers, so the layer moves to the top visually and wins keyboard and mouse priority. The layer object is replaced via spread — itselements,regionFocus,hostPageandcrossPagereferences are kept, so the layer's element components do not remount and no user state is lost.No-op when the layer is already the top layer. Modal layers are unaffected: they live in a separate array that always renders (and takes keyboard/mouse priority) above regular layers, so a raised regular layer never overtakes a modal.