From 7f7c4df188cfaace58384a3eb8e00fe91f9150ee Mon Sep 17 00:00:00 2001 From: vladimir dashukevich Date: Wed, 6 Jun 2018 00:17:42 +0300 Subject: [PATCH 1/2] Prevent closing comment input field on ESC --- web/app/components/input/input.jsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/web/app/components/input/input.jsx b/web/app/components/input/input.jsx index 7902e5a5..6b080c28 100644 --- a/web/app/components/input/input.jsx +++ b/web/app/components/input/input.jsx @@ -65,11 +65,6 @@ export default class Input extends Component { if (e.keyCode === 13 && (e.metaKey || e.ctrlKey)) { this.send(); } - - // cancel on esc - if (e.keyCode === 27 && this.props.onCancel) { - this.props.onCancel(); - } } onInput() { From 638c9cdadbd58d83329dcf54b293a19b3acad4e1 Mon Sep 17 00:00:00 2001 From: vladimir dashukevich Date: Wed, 6 Jun 2018 00:56:51 +0300 Subject: [PATCH 2/2] Fix bug with browser back button --- web/iframe.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/iframe.html b/web/iframe.html index 5ec2f5a2..bc7d0933 100644 --- a/web/iframe.html +++ b/web/iframe.html @@ -83,9 +83,10 @@ function receiveMessages(event) { try { const data = typeof event.data === 'string' ? JSON.parse(event.data) : event.data; + const isItHash = data.hash && data.hash.indexOf("#") === 0; - if (data.hash) { - location.hash = data.hash; + if (isItHash) { + location.replace(data.hash); } } catch (e) {} }