diff --git a/Composer/packages/extensions/visual-designer/src/components/lib/KeyboardZone.tsx b/Composer/packages/extensions/visual-designer/src/components/lib/KeyboardZone.tsx index eef1a4e25a..01b25b7e31 100644 --- a/Composer/packages/extensions/visual-designer/src/components/lib/KeyboardZone.tsx +++ b/Composer/packages/extensions/visual-designer/src/components/lib/KeyboardZone.tsx @@ -17,7 +17,6 @@ const KeyNameByModifierAttr = { const overriddenKeyCodes = ['Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight']; interface KeyboardZoneProps { - when: string; onCommand: (action, e: KeyboardEvent) => object | void; } @@ -35,7 +34,7 @@ const buildModifierKeyPrefix = (e: KeyboardEvent): string => { return prefix; }; -export const KeyboardZone: FC = ({ when, onCommand, children }): JSX.Element => { +export const KeyboardZone: FC = ({ onCommand, children }): JSX.Element => { const handleKeyDown = e => { if (overriddenKeyCodes.includes(e.key)) { e.preventDefault(); diff --git a/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx b/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx index 432de17a6c..aafe981915 100644 --- a/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx +++ b/Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx @@ -182,22 +182,12 @@ export const ObiEditor: FC = ({ selectedIds: [], }); - const [keyboardStatus, setKeyBoardStatus] = useState('normal'); - useEffect((): void => { // Notify container at every selection change. onSelect(selectionContext.selectedIds.length ? selectionContext.selectedIds : focusedId ? [focusedId] : []); }, [focusedId, selectionContext]); useEffect((): void => { - if (selectionContext.selectedIds.length > 0) { - setKeyBoardStatus('selected'); - } else if (focusedId) { - setKeyBoardStatus('focused'); - } else { - setKeyBoardStatus('normal'); - } - selection.setItems(nodeIndexGenerator.current.getItemList()); }); @@ -296,7 +286,7 @@ export const ObiEditor: FC = ({ if (!data) return renderFallbackContent(); return ( - +