Bug 1463554 - Position the HTML select dropdown exactly on the rich option element.r=MattN

MozReview-Commit-ID: 5Rl3lMczGyh

--HG--
extra : rebase_source : d39211c700746b4f3609fe82a54dbd7cc10bc4c9
This commit is contained in:
prathiksha 2018-07-06 12:30:09 -07:00
parent a3ca5bfffb
commit cc64ba4d2f
2 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,13 @@
rich-select {
display: inline-block;
position: relative;
}
/* Focusing on the underlying select element outlines the outer
rich-select wrapper making it appear like rich-select is focused. */
rich-select:focus-within {
outline: 1px dotted;
}
/*
@ -12,6 +19,12 @@ rich-select {
* in the closed state opens the HTML select dropdown. */
rich-select > select {
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin: 0;
}
.rich-option {

View File

@ -28,7 +28,6 @@ export default class RichSelect extends ObservedPropertiesMixin(HTMLElement) {
}
connectedCallback() {
this.tabIndex = 0;
this.appendChild(this.popupBox);
this.render();
}