Fixed enter key in search field

This commit is contained in:
jos 2017-11-22 12:02:27 +01:00
parent 157f63d11a
commit b71afda45a
2 changed files with 3 additions and 6 deletions

View File

@ -82,16 +82,13 @@ export default class Search extends Component {
} }
handleSubmit = (event) => { handleSubmit = (event) => {
event.stopPropagation()
event.preventDefault()
if (this.timeout !== null) { if (this.timeout !== null) {
// there is a pending change // there is a pending change
this.debouncedOnChange() this.debouncedOnChange()
} }
else { else {
// no pending change, go to next result // no pending change, go to next result
this.props.onNext() this.props.onNext(event)
} }
} }

View File

@ -10,7 +10,7 @@
// @selectedColor: #e5e5e5; // @selectedColor: #e5e5e5;
@selectedColor: #ffed99; @selectedColor: #ffed99;
@hoverColor: #f2f2f2; @hoverColor: #f2f2f2;
@hoverAndSelectedColor: #F2E191; @hoverAndSelectedColor: #ffdb80;
.jsoneditor { .jsoneditor {
border: 1px solid @theme-color; border: 1px solid @theme-color;
@ -608,7 +608,7 @@ div.jsoneditor-node-container {
} }
// hovering nested elements // hovering nested elements
.jsoneditor-hover { div.jsoneditor-hover {
background-color: @hoverAndSelectedColor; background-color: @hoverAndSelectedColor;
&.jsoneditor-hover-insert-area { &.jsoneditor-hover-insert-area {