[BUG #8757] Now __updateSlideBar can handle a menu that opens as a contextmenu and opens by a MenuButton

(cherry picked from commit 0c1a742da7fe1f6214f01b5d58a914aab20c5b75)