From f746eff4ca1dd5c4547ce3eb95e54ba85bd880f7 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 8 Feb 2018 17:14:54 +0800 Subject: [PATCH] Enforce multiline on key-value editor (Fixes #745) --- .github/stale.yml | 3 ++- .../insomnia-app/app/ui/components/key-value-editor/row.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/stale.yml b/.github/stale.yml index 09ff94139..5e4aae30c 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -2,9 +2,10 @@ daysUntilStale: 60 daysUntilClose: 7 exemptLabels: - High Priority - - Needs PR + - Accepted - Help Wanted - Blocked + - Bug staleLabel: Stale markComment: > This issue has been automatically marked as stale because it has not had diff --git a/packages/insomnia-app/app/ui/components/key-value-editor/row.js b/packages/insomnia-app/app/ui/components/key-value-editor/row.js index f049d6054..cde4a1b82 100644 --- a/packages/insomnia-app/app/ui/components/key-value-editor/row.js +++ b/packages/insomnia-app/app/ui/components/key-value-editor/row.js @@ -62,6 +62,10 @@ class KeyValueEditorRow extends PureComponent { } _handleValuePaste (e) { + if (!this.props.allowMultiline) { + return; + } + const value = e.clipboardData.getData('text/plain'); if (value && value.includes('\n')) { e.preventDefault();