adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.29k stars 205 forks source link

[Bug]: Dialogs opened with sp-overlay type="page" can be dismissed with Android back #4840

Open hooplapunta opened 3 weeks ago

hooplapunta commented 3 weeks ago

Code of conduct

Impacted component(s)

sp-overlay, sp-dialog-base

Expected behavior

Any dialogs opened with an overlay indicating type of "page" - i.e. do not allow dismissal: should not be dismissed with the Android back button.

Actual behavior

Dialog attribute open is removed and dialog, sp-dialog-base, sp-overlay also no longer have "open" after an Android back button.

Screenshots

No response

What browsers are you seeing the problem in?

Chrome

How can we reproduce this issue?

behavior can be observed on basic

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog

open dialog use android back button to close - navigator is not triggered same applies to any sp-dialog etc.

This is allowing users in Adobe Express to skip the landscape blocker dialog when the phone is rotated to landscape. Other similar workflows as well.

Sample code or abstract reproduction which illustrates the problem

https://github.com/whatwg/html/issues/5667#issuecomment-648994437 https://html.spec.whatwg.org/multipage/interaction.html#close-requests-and-close-watchers

behavior can be observed on basic

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog

Severity

SEV 2

Logs taken while reproducing problem

No response

najikahalsema commented 2 weeks ago

We historically haven't done work to support Android, so we haven't tested for this kind of use case. We'd need to test this on our side and get back to you about how we can fix this.