Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions packages/react-core/src/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -334,23 +334,6 @@ export const Popover: React.FunctionComponent<PopoverProps> = ({
}
}
};
const onTriggerEnter = (event: KeyboardEvent) => {
if (event.keyCode === KEY_CODES.ENTER) {
if (!visible) {
if (triggerManually) {
shouldOpen(show, event);
} else {
show(true);
}
} else {
if (triggerManually) {
shouldClose(null, hide, event);
} else {
hide();
}
}
}
};
const onTriggerClick = (event: MouseEvent) => {
if (triggerManually) {
if (visible) {
Expand All @@ -362,7 +345,7 @@ export const Popover: React.FunctionComponent<PopoverProps> = ({
if (visible) {
hide();
} else {
show();
show(true);
}
}
};
Expand Down Expand Up @@ -451,7 +434,6 @@ export const Popover: React.FunctionComponent<PopoverProps> = ({
distance={distance}
placement={position}
onTriggerClick={onTriggerClick}
onTriggerEnter={onTriggerEnter}
onDocumentClick={onDocumentClick}
onDocumentKeyDown={onDocumentKeyDown}
enableFlip={enableFlip}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ exports[`Popover should match snapshot (auto-generated) 1`] = `
onDocumentClick={[Function]}
onDocumentKeyDown={[Function]}
onTriggerClick={[Function]}
onTriggerEnter={[Function]}
placement="top"
popper={
<FocusTrap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ exports[`popover can close from content (uncontrolled) 1`] = `
onDocumentClick={[Function]}
onDocumentKeyDown={[Function]}
onTriggerClick={[Function]}
onTriggerEnter={[Function]}
placement="top"
popper={
<FocusTrap
Expand Down Expand Up @@ -150,7 +149,6 @@ exports[`popover can have a custom minimum width 1`] = `
onDocumentClick={[Function]}
onDocumentKeyDown={[Function]}
onTriggerClick={[Function]}
onTriggerEnter={[Function]}
placement="top"
popper={
<FocusTrap
Expand Down Expand Up @@ -256,7 +254,6 @@ exports[`popover can specify position as object value 1`] = `
onDocumentClick={[Function]}
onDocumentKeyDown={[Function]}
onTriggerClick={[Function]}
onTriggerEnter={[Function]}
placement="right"
popper={
<FocusTrap
Expand Down Expand Up @@ -362,7 +359,6 @@ exports[`popover renders close-button, header and body 1`] = `
onDocumentClick={[Function]}
onDocumentKeyDown={[Function]}
onTriggerClick={[Function]}
onTriggerEnter={[Function]}
placement="top"
popper={
<FocusTrap
Expand Down