Skip to content

Commit

Permalink
[Security Solution] Remove focustrap (#89905) (#89944)
Browse files Browse the repository at this point in the history
* remove focustrap

* remove focustrap

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
angorayc and kibanamachine committed Feb 2, 2021
1 parent 341d6ef commit dc7ef4e
Showing 1 changed file with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
EuiButtonEmpty,
EuiFlexGroup,
EuiFlexItem,
EuiFocusTrap,
EuiScreenReaderOnly,
} from '@elastic/eui';
import React, { useCallback } from 'react';
Expand Down Expand Up @@ -83,31 +82,29 @@ export const AddNote = React.memo<{

return (
<AddNotesContainer onKeyDown={onKeyDown} role="dialog">
<EuiFocusTrap>
<div style={{ width: '100%' }}>
<EuiScreenReaderOnly data-test-subj="screenReaderOnly">
<p>{i18n.YOU_ARE_EDITING_A_NOTE}</p>
</EuiScreenReaderOnly>
<NewNote note={newNote} noteInputHeight={200} updateNewNote={updateNewNote} />
<ButtonsContainer gutterSize="none">
{onCancelAddNote != null ? (
<EuiFlexItem grow={false}>
<CancelButton onCancelAddNote={onCancelAddNote} />
</EuiFlexItem>
) : null}
<div style={{ width: '100%' }}>
<EuiScreenReaderOnly data-test-subj="screenReaderOnly">
<p>{i18n.YOU_ARE_EDITING_A_NOTE}</p>
</EuiScreenReaderOnly>
<NewNote note={newNote} noteInputHeight={200} updateNewNote={updateNewNote} />
<ButtonsContainer gutterSize="none">
{onCancelAddNote != null ? (
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="add-note"
isDisabled={newNote.trim().length === 0}
fill={true}
onClick={handleClick}
>
{i18n.ADD_NOTE}
</EuiButton>
<CancelButton onCancelAddNote={onCancelAddNote} />
</EuiFlexItem>
</ButtonsContainer>
</div>
</EuiFocusTrap>
) : null}
<EuiFlexItem grow={false}>
<EuiButton
data-test-subj="add-note"
isDisabled={newNote.trim().length === 0}
fill={true}
onClick={handleClick}
>
{i18n.ADD_NOTE}
</EuiButton>
</EuiFlexItem>
</ButtonsContainer>
</div>
</AddNotesContainer>
);
});
Expand Down

0 comments on commit dc7ef4e

Please sign in to comment.