mirror of
https://github.com/discourse/discourse.git
synced 2025-04-03 05:39:41 +08:00
FIX: differentiate sk outline handling on single/multi (#9512)
This commit is contained in:
parent
4e5f9d4cd1
commit
4889dbde49
@ -832,6 +832,8 @@ export default Component.extend(
|
|||||||
placementStrategy = inModal ? "fixed" : "absolute";
|
placementStrategy = inModal ? "fixed" : "absolute";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const verticalOffset = this.multiSelect ? 0 : 2;
|
||||||
|
|
||||||
/* global Popper:true */
|
/* global Popper:true */
|
||||||
this.popper = Popper.createPopper(anchor, popper, {
|
this.popper = Popper.createPopper(anchor, popper, {
|
||||||
eventsEnabled: false,
|
eventsEnabled: false,
|
||||||
@ -841,7 +843,7 @@ export default Component.extend(
|
|||||||
{
|
{
|
||||||
name: "offset",
|
name: "offset",
|
||||||
options: {
|
options: {
|
||||||
offset: [0, 2]
|
offset: [0, verticalOffset]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -853,7 +855,7 @@ export default Component.extend(
|
|||||||
".select-kit-wrapper"
|
".select-kit-wrapper"
|
||||||
);
|
);
|
||||||
if (wrapper) {
|
if (wrapper) {
|
||||||
let height = this.element.offsetHeight;
|
let height = this.element.offsetHeight + verticalOffset;
|
||||||
|
|
||||||
const body = this.element.querySelector(".select-kit-body");
|
const body = this.element.querySelector(".select-kit-body");
|
||||||
if (body) {
|
if (body) {
|
||||||
@ -873,7 +875,8 @@ export default Component.extend(
|
|||||||
this.element.classList.add("is-under");
|
this.element.classList.add("is-under");
|
||||||
}
|
}
|
||||||
|
|
||||||
wrapper.style.width = `${this.element.offsetWidth}px`;
|
// - 1 accounts for any rounding error
|
||||||
|
wrapper.style.width = `${this.element.offsetWidth - 1}px`;
|
||||||
wrapper.style.height = `${height}px`;
|
wrapper.style.height = `${height}px`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
.multi-select-header {
|
.multi-select-header {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-kit-body {
|
.select-kit-body {
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-kit-header {
|
|
||||||
outline: 1px solid $tertiary;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-loading {
|
&.is-loading {
|
||||||
|
@ -8,4 +8,10 @@
|
|||||||
border-bottom: 1px solid $primary-low;
|
border-bottom: 1px solid $primary-low;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.is-expanded {
|
||||||
|
.select-kit-header {
|
||||||
|
outline: 1px solid $tertiary;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user