Fix styling of autocompletion dropdown broken. Regression since `v6.4.0`

This commit is contained in:
jos 2019-08-28 14:47:48 +02:00
parent 6d5d9965c3
commit 1976a8e2e8
3 changed files with 11 additions and 6 deletions

View File

@ -2,6 +2,11 @@
https://github.com/josdejong/jsoneditor 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 ## 2019-08-28, version 6.4.0
- Replaces CSS with SASS internally, improvements in styling. Thanks @ppetkow. - Replaces CSS with SASS internally, improvements in styling. Thanks @ppetkow.

View File

@ -38,8 +38,9 @@ function completely(config) {
var ix = 0; var ix = 0;
var oldIndex = -1; var oldIndex = -1;
var onMouseOver = function () { this.style.outline = '1px solid #ddd'; } // TODO: move this styling in JS to SCSS
var onMouseOut = function () { this.style.outline = '0'; } 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 onMouseDown = function () { p.hide(); p.onmouseselection(this.__hint, p.rs); }
var p = { var p = {
@ -103,7 +104,7 @@ function completely(config) {
if (oldIndex != -1 && rows[oldIndex]) { if (oldIndex != -1 && rows[oldIndex]) {
rows[oldIndex].className = "item"; rows[oldIndex].className = "item";
} }
rows[index].className = "item hover"; rows[index].className = "item hover";
oldIndex = index; oldIndex = index;
}, },
move: function (step) { // moves the selection either up or down (unless it's not possible) step is either +1 or -1. move: function (step) { // moves the selection either up or down (unless it's not possible) step is either +1 or -1.

View File

@ -1,7 +1,7 @@
@import "styles"; @import "styles";
.jsoneditor { .jsoneditor {
&.autocomplete { .autocomplete {
&.dropdown { &.dropdown {
position: absolute; position: absolute;
background: $jse-white; background: $jse-white;
@ -12,8 +12,7 @@
overflow-y: auto; overflow-y: auto;
cursor: default; cursor: default;
margin: 0; margin: 0;
padding-left: 2pt; padding: 5px;
padding-right: 5pt;
text-align: left; text-align: left;
outline: 0; outline: 0;
font-family: $jse-font-mono; font-family: $jse-font-mono;