menu: fix displaying new lines in labels/values
This commit is contained in:
parent
cd7a29c51e
commit
e8bc6a6d77
3 changed files with 7 additions and 2 deletions
|
|
@ -49,8 +49,9 @@ class MenuBase extends Widget {
|
|||
var string = this.getProp('label') === 'auto' ? '%value' : this.getProp('label'),
|
||||
i = this.selected
|
||||
|
||||
|
||||
if (i > -1 && string) {
|
||||
this.text.innerHTML = iconify(String(string).replace(/%value/g, JSON.stringify(this.value)).replace(/%key/g, this.keys[i]))
|
||||
this.text.innerHTML = iconify(String(string).replace(/%value/g, typeof this.value === 'string' ? this.value : JSON.stringify(this.value)).replace(/%key/g, this.keys[i]))
|
||||
} else {
|
||||
this.text.innerHTML = ''
|
||||
}
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@
|
|||
|
||||
|
||||
.item {
|
||||
|
||||
white-space: pre;
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
div {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue