From 84b0912c5cab0b269cf1703351ef6bf299b1d7ee Mon Sep 17 00:00:00 2001 From: Jakob Werner Date: Mon, 22 Jan 2018 18:57:28 +0100 Subject: [PATCH 1/2] Enabling back text selection inside focusTrapZone --- .../src/components/FocusTrapZone/FocusTrapZone.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx index a757b7be7b30c1..7e8bdecd69ecce 100644 --- a/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx +++ b/packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx @@ -94,8 +94,6 @@ export class FocusTrapZone extends BaseComponent implem ref='root' aria-labelledby={ ariaLabelledBy } onKeyDown={ this._onKeyboardHandler } - tabIndex={ -1 } - onFocus={ this._onRootFocus } > { this.props.children } @@ -124,13 +122,6 @@ export class FocusTrapZone extends BaseComponent implem } } - @autobind - private _onRootFocus(ev: React.FocusEvent) { - if (ev.target === this.refs.root) { - this.focus(); - } - } - @autobind private _onKeyboardHandler(ev: React.KeyboardEvent) { if (ev.which !== KeyCodes.tab) { From 471dc1790dc5b5f3aaf824b788444421eb05633c Mon Sep 17 00:00:00 2001 From: Jakob Werner Date: Mon, 22 Jan 2018 18:58:47 +0100 Subject: [PATCH 2/2] Changefile --- .../focusTrapZone_2018-01-22-17-58.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/office-ui-fabric-react/focusTrapZone_2018-01-22-17-58.json diff --git a/common/changes/office-ui-fabric-react/focusTrapZone_2018-01-22-17-58.json b/common/changes/office-ui-fabric-react/focusTrapZone_2018-01-22-17-58.json new file mode 100644 index 00000000000000..aa1df030e656fc --- /dev/null +++ b/common/changes/office-ui-fabric-react/focusTrapZone_2018-01-22-17-58.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "[FocusTrapZone] Text selection inside FocusTrapZone was broken. This brings it back", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "jawerne@microsoft.com" +} \ No newline at end of file