@playkit-js/transcript 3.5.32 → 3.5.33-canary.0-803447e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ import {ScreenReaderProvider} from '@playkit-js/common/dist/hoc/sr-wrapper';
|
|
|
15
15
|
import {OnClickEvent, OnClick} from '@playkit-js/common/dist/hoc/a11y-wrapper';
|
|
16
16
|
import {TranscriptEvents} from '../../events/events';
|
|
17
17
|
|
|
18
|
-
const {ENTER, SPACE, TAB} = ui.utils.KeyMap;
|
|
18
|
+
const {ENTER, SPACE, TAB, ESC} = ui.utils.KeyMap;
|
|
19
19
|
const {withText, Text} = ui.preacti18n;
|
|
20
20
|
|
|
21
21
|
const {SidePanelModes} = ui;
|
|
@@ -166,6 +166,12 @@ export class Transcript extends Component<TranscriptProps, TranscriptState> {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
private _handleClose = (event: KeyboardEvent) => {
|
|
170
|
+
if (event.keyCode === ESC){
|
|
171
|
+
this.props.onClose(event, true);
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
169
175
|
private _enableAutoScroll = (event: OnClickEvent, byKeyboard?: boolean) => {
|
|
170
176
|
event.preventDefault();
|
|
171
177
|
if (this.state.isAutoScrollEnabled) {
|
|
@@ -512,6 +518,7 @@ export class Transcript extends Component<TranscriptProps, TranscriptState> {
|
|
|
512
518
|
ref={node => {
|
|
513
519
|
this._widgetRootRef = node;
|
|
514
520
|
}}
|
|
521
|
+
onKeyUp={this._handleClose}
|
|
515
522
|
data-testid="transcript_root">
|
|
516
523
|
{smallScreen && !kitchenSinkDetached ? (
|
|
517
524
|
<SmallScreenSlate onClose={this.props.onClose} toggledWithEnter={toggledWithEnter} />
|