From b71afda45ac9e842041aa75237b125de11985255 Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 22 Nov 2017 12:02:27 +0100 Subject: [PATCH] Fixed enter key in search field --- src/components/menu/Search.js | 5 +---- src/jsoneditor.less | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/menu/Search.js b/src/components/menu/Search.js index 13ccf3b..6102384 100644 --- a/src/components/menu/Search.js +++ b/src/components/menu/Search.js @@ -82,16 +82,13 @@ export default class Search extends Component { } handleSubmit = (event) => { - event.stopPropagation() - event.preventDefault() - if (this.timeout !== null) { // there is a pending change this.debouncedOnChange() } else { // no pending change, go to next result - this.props.onNext() + this.props.onNext(event) } } diff --git a/src/jsoneditor.less b/src/jsoneditor.less index edda97c..10b9178 100644 --- a/src/jsoneditor.less +++ b/src/jsoneditor.less @@ -10,7 +10,7 @@ // @selectedColor: #e5e5e5; @selectedColor: #ffed99; @hoverColor: #f2f2f2; -@hoverAndSelectedColor: #F2E191; +@hoverAndSelectedColor: #ffdb80; .jsoneditor { border: 1px solid @theme-color; @@ -608,7 +608,7 @@ div.jsoneditor-node-container { } // hovering nested elements - .jsoneditor-hover { + div.jsoneditor-hover { background-color: @hoverAndSelectedColor; &.jsoneditor-hover-insert-area {