mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-22 23:28:33 -04:00
fix: adding a simple fix for entering to send a request (#4868)
* add hack * adding the empty string check else where * limiting the event scope This merge will close the following draft PR for its spike work as well.
This commit is contained in:
@@ -142,6 +142,11 @@ export class RequestUrlBar extends PureComponent<Props, State> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.code === 'Enter' && this.props.request.url) {
|
||||
this._handleSend();
|
||||
return;
|
||||
}
|
||||
|
||||
executeHotKey(event, hotKeyRefs.REQUEST_FOCUS_URL, () => {
|
||||
this._input?.focus();
|
||||
this._input?.selectAll();
|
||||
@@ -359,7 +364,7 @@ export class RequestUrlBar extends PureComponent<Props, State> {
|
||||
const { url, method } = request;
|
||||
|
||||
return (
|
||||
<KeydownBinder onKeydown={this._handleKeyDown}>
|
||||
<KeydownBinder onKeydown={this._handleKeyDown} scoped>
|
||||
<div className="urlbar">
|
||||
<MethodDropdown
|
||||
ref={this._setMethodDropdownRef}
|
||||
|
||||
Reference in New Issue
Block a user