- Get dialog contents visible in Firefox
Something in how Firefox parsed or inserted the style and children caused an error:
Node.insertBefore: Child to insert before is not a child of this node
which caused the dialog contents to be missing from the shadow DOM. This fixes the missing contents by putting the style in using a different way.
- Fix vfsSelect did not close (seen in collabora save as)
- Turn off destroy_on_close, vfsSelect was destroying opening session (seen in mail compose 404)
- Add doSubmit property to Et2Button, dialog no longer gives error on every button click
- dialog can now adopt buttons from the template. Preferrably set slot="buttons", but it'll find them anywhere if you don't
- Reduce size & padding for non-template content
- Fix some event listeners
- Add getCompleted() promise that resolves when the dialog closes.
- Et2Dialog.alert() returns the promise directly, other static methods return the Et2Dialog to avoid breaking existing code
You can now wait for a dialog with:
Et2Dialog.show_prompt(null,"Name?").getComplete().then(([button_id,value]) => console.log(value));
or using async:
[button_id, value] = await Et2Dialog.show_prompt(null,"Name?").getComplete();
if(button_id === Et2Dialog.BUTTON_OK) {...}