Revert "Missing $elem parameter on _hide method when handling leaf elements clicks on dropdown menus." This reverts commit 3cf1597f.