Submenu remains open

In this sample under Edit when cursor is moved onto Undo, submenu is shown but when cursor is moved onto Redo or Lock cell that submenu remains visible. It should be closed automatically whether next menu item have child items or not.