From 2c9b177f2c54ef93d8d66c1242573b257fdaf083 Mon Sep 17 00:00:00 2001 From: Lingling Becker <83479082+litong2@users.noreply.github.com> Date: Thu, 3 Jun 2021 10:46:40 -0700 Subject: [PATCH] Bug 111881: UnifiedPicker: Backspace does not work for recipients in pop out window (#18428) * fix pop out compose backspace delete * Change files --- ...t-experiments-2d78d84b-e392-4d77-9619-42110f62351d.json | 7 +++++++ .../src/components/UnifiedPicker/UnifiedPicker.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 change/@fluentui-react-experiments-2d78d84b-e392-4d77-9619-42110f62351d.json diff --git a/change/@fluentui-react-experiments-2d78d84b-e392-4d77-9619-42110f62351d.json b/change/@fluentui-react-experiments-2d78d84b-e392-4d77-9619-42110f62351d.json new file mode 100644 index 0000000000000..eb950afeb9672 --- /dev/null +++ b/change/@fluentui-react-experiments-2d78d84b-e392-4d77-9619-42110f62351d.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "unifiedpicker: make backspace delete work for pop out windows", + "packageName": "@fluentui/react-experiments", + "email": "litong@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx index ba5fc600bbb73..2d566951eacb2 100644 --- a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx +++ b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPicker.tsx @@ -371,7 +371,7 @@ export const UnifiedPicker = (props: IUnifiedPickerProps): JSX. input && input.current && !input.current.isValueSelected && - input.current.inputElement === document.activeElement && + input.current.inputElement === ev.currentTarget.ownerDocument.activeElement && (input.current as Autofill).cursorLocation === 0 ) { const indexToRemove = selectedItems.length - 1;