remove the containerNode property - yagni
more reliable stoppage of context menu event
ensure menus and submenus open onscreen

the logic also handles offsetting the submenu by the correct amount when
it needs to reverse the opening layout direction