+ var parent = this.parent;\r
+ // 1. If it's sub-menu, restore the last focused item\r
+ // of upper level menu.\r
+ // 2. In case of a top-menu, close it.\r
+ if ( parent )\r
+ {\r
+ parent._.panel.hideChild();\r
+ // Restore parent block item focus.\r
+ var parentBlock = parent._.panel._.panel._.currentBlock,\r
+ parentFocusIndex = parentBlock._.focusIndex;\r
+ parentBlock._.markItem( parentFocusIndex );\r
+ }\r
+ else if ( keystroke == 27 )\r
+ {\r
+ this.hide();\r
+ editor.focus();\r
+ }\r
+ return false;\r