Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/main/src/Popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,11 @@ abstract class Popup extends UI5Element {

this._addOpenedPopup();

this.classList.add("ui5-popup-opening");
setTimeout(() => {
this.classList.remove("ui5-popup-opening");
}, 50);

this.open = true;

// initial focus, if focused element is statically created
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/themes/Popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@

:host(:focus-visible) {
outline: none;
}

:host(.ui5-popup-opening) {
opacity: 0.1;
}
71 changes: 71 additions & 0 deletions packages/main/test/pages/Dialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
<br>
<br>
<ui5-button id="open-big-content">Open dialog with big content</ui5-button>
<br>
<br>
<ui5-button id="open-big-dynamic-content">Open dynamic dialog with big content</ui5-button>
<br>
<br>
</div>
<ui5-block-layer></ui5-block-layer>

Expand Down Expand Up @@ -1127,6 +1132,72 @@
document.getElementById("open-big-content").addEventListener("click", function () {
window["dlgBigContent"].open = true;
});

document.getElementById("open-big-dynamic-content").addEventListener("click", function () {
const dialog = document.createElement("ui5-dialog");
const child1 = `
<div slot="header" design="Header">
<h3>Random Title</h3>
</div>
`;

const child2 = `
<div>
<div>
<div>
<div>
<div>
<img src="randomImage.png">
</div>
</div>
<div>
<div>Contact RANDOM CORP</div>
<div>Some subtitle</div>
</div>
</div>
</div>
<form>
<div>
<div>
<p>Subscribe to our newsletter</p>
<small>No spam, only updates.</small>
</div>
</div>
<div>
<small>Hint: Use a valid code</small>
</div>
<div>Your Info</div>
<div>
<div>
</div>
<div>
</div>
</div>
<div>Company Info</div>
<div>
<div>
</div>
<div>
</div>
</div>
<div></div>
<div>
<div>
<span>
I agree to the random terms and conditions.
Read Privacy Policy.
</span>
</div>
</div>
<div></div>
</form>
</div>
`;

dialog.innerHTML = child1 + child2;
document.body.appendChild(dialog);
dialog.open = true;
});
</script>
</body>

Expand Down
Loading