diff --git a/src/components/DatePicker.tsx b/src/components/DatePicker.tsx index 031495f7e..d50c08523 100644 --- a/src/components/DatePicker.tsx +++ b/src/components/DatePicker.tsx @@ -299,6 +299,7 @@ export class DatePicker extends React.Component { handleKeyPress(e: React.KeyboardEvent) { if (e.key === ' ') { this.handleClick(); + e.preventDefault(); } } diff --git a/src/components/DateRangePicker.tsx b/src/components/DateRangePicker.tsx index 8e1346ffb..5e357c890 100644 --- a/src/components/DateRangePicker.tsx +++ b/src/components/DateRangePicker.tsx @@ -326,6 +326,7 @@ export class DateRangePicker extends React.Component< handleKeyPress(e: React.KeyboardEvent) { if (e.key === ' ') { this.handleClick(); + e.preventDefault(); } } diff --git a/src/components/Select.tsx b/src/components/Select.tsx index 0c5138980..bf2a1aac6 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -491,6 +491,7 @@ export class Select extends React.Component { handleKeyPress(e: React.KeyboardEvent) { if (e.key === ' ') { this.toggle(); + e.preventDefault(); } } diff --git a/src/renderers/Form/Picker.tsx b/src/renderers/Form/Picker.tsx index 5d645c8e3..e4bb9ee66 100644 --- a/src/renderers/Form/Picker.tsx +++ b/src/renderers/Form/Picker.tsx @@ -272,6 +272,7 @@ export default class PickerControl extends React.PureComponent< if (e.key === ' ') { this.open(); + e.preventDefault(); } else if (selectedOptions.length && e.key == 'Backspace') { this.removeItem(selectedOptions.length - 1); } diff --git a/src/renderers/Form/TreeSelect.tsx b/src/renderers/Form/TreeSelect.tsx index 81636dabe..2ccbe21f8 100644 --- a/src/renderers/Form/TreeSelect.tsx +++ b/src/renderers/Form/TreeSelect.tsx @@ -127,6 +127,7 @@ export default class TreeSelectControl extends React.Component< handleKeyPress(e: React.KeyboardEvent) { if (e.key === ' ') { this.handleClick(); + e.preventDefault(); } }