diff --git a/wax-prosemirror-services/src/MatchingService/components/DropDownComponent.js b/wax-prosemirror-services/src/MatchingService/components/DropDownComponent.js index 188a7ad6be2664e3b9f2400bdf8c3cbe39148691..11095d07395a9399c5363d828283415551a30dca 100644 --- a/wax-prosemirror-services/src/MatchingService/components/DropDownComponent.js +++ b/wax-prosemirror-services/src/MatchingService/components/DropDownComponent.js @@ -163,10 +163,12 @@ const DropComponent = ({ getPos, node, view }) => { aria-haspopup disabled={isDisabled} onKeyDown={e => { - e.preventDefault(); if (e.keyCode === 40) { itemRefs.current[0].current.focus(); } + if (e.keyCode === 27) { + openCloseMenu(); + } }} onMouseDown={openCloseMenu} type="button" diff --git a/wax-prosemirror-services/src/TablesService/components/TableDropDown.js b/wax-prosemirror-services/src/TablesService/components/TableDropDown.js index 442403cce03bccba0c0495cb5c85868017eb8bef..1ee58b2ac419c1bd313e8104b10817f35157d322 100644 --- a/wax-prosemirror-services/src/TablesService/components/TableDropDown.js +++ b/wax-prosemirror-services/src/TablesService/components/TableDropDown.js @@ -141,6 +141,9 @@ const TableDropDown = ({ item }) => { if (e.keyCode === 40) { itemRefs.current[0].current.focus(); } + if (e.keyCode === 27) { + openCloseMenu(); + } }} onMouseDown={openCloseMenu} type="button" diff --git a/wax-prosemirror-services/src/WaxToolGroups/QuestionsDropDownToolGroupService/DropDownComponent.js b/wax-prosemirror-services/src/WaxToolGroups/QuestionsDropDownToolGroupService/DropDownComponent.js index a5487e967b34e59df33224c500d8a6d4d27e6383..fac5f300bd7c8e8e9584a830e2337ec1833e75e0 100644 --- a/wax-prosemirror-services/src/WaxToolGroups/QuestionsDropDownToolGroupService/DropDownComponent.js +++ b/wax-prosemirror-services/src/WaxToolGroups/QuestionsDropDownToolGroupService/DropDownComponent.js @@ -200,6 +200,9 @@ const DropDownComponent = ({ view, tools }) => { if (e.keyCode === 40) { itemRefs.current[0].current.focus(); } + if (e.keyCode === 27) { + openCloseMenu(); + } }} onMouseDown={openCloseMenu} type="button"