Description
When a step includes a popover attached to an element inside a <dialog>, the popover is rendered behind the dialog instead of on top of it.
Steps to reproduce
- Open the demo: https://jsfiddle.net/2dmf6nwp
- Click Start driver.
- Proceed to the step that opens the dialog.
- Observe the popover for the dialog’s content.
Minimal reproducible example if jsfiddle link invalidated
<button id="startDriver">Start driver</button>
<button id="openDialog">Open dialog</button>
<dialog id="myDialog">
<p>This is a dialog box!</p>
<button id="closeDialog">Close</button>
</dialog>
const dialog = document.getElementById("myDialog");
document
.getElementById('openDialog')
.addEventListener('click', () => dialog.showModal());
document
.getElementById('closeDialog')
.addEventListener('click', () => dialog.close());
const driver = window.driver.js.driver;
const driverObj = driver({
showProgress: true,
steps: [
{
element: '#openDialog',
popover: {
title: 'Open dialog',
description: 'This button opens a dialog',
onNextClick: () => {
dialog.showModal();
driverObj.moveNext();
},
},
},
{
element: '#closeDialog',
popover: {
title: 'Close dialog',
description: 'This button closes the dialog',
},
}
],
});
document
.getElementById('startDriver')
.addEventListener('click', () => driverObj.drive());
Result
The popover is displayed behind the dialog:

Expected result
The popover renders above the modal/dialog
Description
When a step includes a popover attached to an element inside a
<dialog>, the popover is rendered behind the dialog instead of on top of it.Steps to reproduce
Minimal reproducible example if jsfiddle link invalidated
Result
The popover is displayed behind the dialog:

Expected result
The popover renders above the modal/dialog