Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Overlay Trigger Bug
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script type="module">
import {Theme} from "@spectrum-web-components/theme/lib/index";
import {OverlayTrigger} from "@spectrum-web-components/overlay/lib/index";
import {Popover} from "@spectrum-web-components/popover/lib/index";
import {Button} from "@spectrum-web-components/button/lib/index";
import {render, html} from 'lit-html';
export default class BugRepro extends HTMLElement {
connectedCallback() {
this.attachShadow( {mode: "open"});
render(html`<p>Click the "popopen" button to open the popup. Then click "click me" to open a file dialog. Choose a file or cancel. Now, the popup no longer opens</p>
<overlay-trigger id="trigger" placement="bottom" offset="0">
<sp-action-button slot="trigger" quiet>+POPOPEN+</sp-action-button>
<sp-popover dialog slot="click-content" direction="bottom" open>
<button @click=${e => this.shadowRoot.querySelector('input').click()}>click me</button>
<input style="display: none" type="file" id="file-upload" multiple accept="image/*">`, this.shadowRoot);
customElements.define('bug-repro', BugRepro);
window.process = window.process || {};
window.process.env = window.process.env || {};
window.process.env.NODE_ENV = window.process.env.NODE_ENV || 'production';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment