mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Fixes the input `.focus()` method call. The simplest fix was to revert the change in 3cf464d059
.
There do not seem to be any new problems in the current application from reverting this commit's relevant changes, indicating that the original cause of the bug is no longer present.
This commit is contained in:
parent
1a464446b0
commit
fa7dd44d8c
@ -16,7 +16,6 @@ export interface ModalProps {
|
||||
wide?: boolean;
|
||||
skinny?: boolean;
|
||||
noEscape?: boolean;
|
||||
dontFocus?: boolean;
|
||||
closeOnKeyCodes?: any[];
|
||||
onShow?: Function;
|
||||
onHide?: Function;
|
||||
@ -118,10 +117,6 @@ export class Modal extends PureComponent<ModalProps, State> {
|
||||
|
||||
this.props.onShow?.();
|
||||
|
||||
if (this.props.dontFocus) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow instance-based onHide method
|
||||
this.onHide = options?.onHide ?? null;
|
||||
setTimeout(() => this._node?.focus());
|
||||
|
@ -412,7 +412,6 @@ class RequestSwitcherModal extends PureComponent<ReduxProps, State> {
|
||||
<KeydownBinder onKeydown={this._handleKeydown} onKeyup={this._handleKeyup}>
|
||||
<Modal
|
||||
ref={this._setModalRef}
|
||||
dontFocus={!disableInput}
|
||||
className={isModalVisible ? '' : 'hide'}
|
||||
>
|
||||
<ModalHeader hideCloseButton>
|
||||
|
Loading…
Reference in New Issue
Block a user