diff --git a/HISTORY.md b/HISTORY.md index 100db8c..e8427a0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,11 @@ https://github.com/josdejong/jsoneditor +## 2019-08-28, version 6.4.1 + +- Fix styling of autocompletion dropdown broken. Regression since `v6.4.0`. + + ## 2019-08-28, version 6.4.0 - Replaces CSS with SASS internally, improvements in styling. Thanks @ppetkow. diff --git a/src/js/autocomplete.js b/src/js/autocomplete.js index e4e2640..0232a6c 100644 --- a/src/js/autocomplete.js +++ b/src/js/autocomplete.js @@ -38,8 +38,9 @@ function completely(config) { var ix = 0; var oldIndex = -1; - var onMouseOver = function () { this.style.outline = '1px solid #ddd'; } - var onMouseOut = function () { this.style.outline = '0'; } + // TODO: move this styling in JS to SCSS + var onMouseOver = function () { this.style.backgroundColor = '#ddd'; } + var onMouseOut = function () { this.style.backgroundColor = ''; } var onMouseDown = function () { p.hide(); p.onmouseselection(this.__hint, p.rs); } var p = { @@ -103,7 +104,7 @@ function completely(config) { if (oldIndex != -1 && rows[oldIndex]) { rows[oldIndex].className = "item"; } - rows[index].className = "item hover"; + rows[index].className = "item hover"; oldIndex = index; }, move: function (step) { // moves the selection either up or down (unless it's not possible) step is either +1 or -1. diff --git a/src/scss/autocomplete.scss b/src/scss/autocomplete.scss index fd3624c..870d721 100644 --- a/src/scss/autocomplete.scss +++ b/src/scss/autocomplete.scss @@ -1,7 +1,7 @@ @import "styles"; .jsoneditor { - &.autocomplete { + .autocomplete { &.dropdown { position: absolute; background: $jse-white; @@ -12,8 +12,7 @@ overflow-y: auto; cursor: default; margin: 0; - padding-left: 2pt; - padding-right: 5pt; + padding: 5px; text-align: left; outline: 0; font-family: $jse-font-mono;