Clicking the preperated gui element raises an on_gui_click event but the event.element does not have a .name or a .parent (did not check for further properties) despite evaluating .valid as true.
Reproduction:
1) Create a new GUI element (i.e. a button)
2) Set .enabled=false on the highest of it's parents (the disabled element must not have any visible or invisible elements behind it (i.e. frames, flows, etc).
3) Make sure that no entities are behind the element, game.player.selected must be nil for the bug to occur.
4) Click the GUI element, which will cause on_gui_click to be raised like described in "Behavior".
Code: Select all
local function test_center_gui(LuaPlayer)
--clicking either frame or button will cause the bug
LuaPlayer.gui.center.add{name='parentttt',type='flow',enabled=false}
.add{name='frame',type='frame'}
.add{name='button',type='button',style='slot_button_style'}
end