netrunner icon indicating copy to clipboard operation
netrunner copied to clipboard

SMC menu priority issue.

Open poi2000 opened this issue 9 years ago • 9 comments

I'm assuming this was an issue with priorities in layered menus.As runner, when I hit the Run button for my action, I had trouble selecting the server to run on because the Self-modifying code was right underneath the server menu and when I tried clicking on most of the button to select a server, it brought up the SMC menu instead. The far edge of the menu was clickable but it served as somewhat of a nuisance.

poi2000 avatar Dec 09 '16 02:12 poi2000

Thanks for the report. I've noticed this recently too, especially when programs occupy the 2nd row of the rig. Notice in the picture below that the R&D "button" of the Run menu is not lit up in orange like it should be on hover (oops, guess my pointer didn't appear in the screen grab), and also that the virus counters on Cache are above everything.

screen shot 2016-12-08 at 8 45 32 pm

JoelCFC25 avatar Dec 09 '16 02:12 JoelCFC25

This probably tracks back to #2160.

JoelCFC25 avatar Dec 09 '16 14:12 JoelCFC25

I did a quick test and this looks to be a z-index issue. The z-index of the .gameboard .countersis set to 10 when you disable this the issue is fixed. I'm not sure why however as the run menu has z-index 40.

lpoulter avatar Dec 15 '16 15:12 lpoulter

My bad, I will look into this bug and see if I can get a fix in this weekend.

DeepSpawn avatar Dec 16 '16 09:12 DeepSpawn

i've found the issue. #2189 set the z-index of right-inner-leftpane to 1. This is inherited by the run sub menu. As counters is z-index 10 it appears higher than the sub-menu. @erbridge you set the index to 1 in #2804. I'm unable to raise a PR now but if we set right-inner-leftpane higher than the .counters z-index.

lpoulter avatar Dec 16 '16 11:12 lpoulter

Yep, that is exactly what is happening. I just finished going down the rabbit hole of reading up on the stacking context rules.

Setting right-inner-leftpanel to Z level > 10 will fix this issue, but I am unsure if this will have any other consequences. Are we ok to go ahead and make that change?

DeepSpawn avatar Dec 16 '16 11:12 DeepSpawn

Well discovered. I wish we weren't using z-index for layout at all...

erbridge avatar Dec 16 '16 15:12 erbridge

@erbridge out of interest what are alternatives to z-index?

lpoulter avatar Dec 16 '16 15:12 lpoulter

Natural DOM ordering. Things higher in the DOM appear beneath things below them.

erbridge avatar Dec 16 '16 15:12 erbridge