Open r10s opened 3 years ago
note: this dialog is technically not stacked, its a single one.
note: this dialog is technically not stacked, its a single one.
okay. from the user-perspective, however, that does not really matter: there is a dialog opening another dialog - otherwise, also the "Cancel" button should always close the whole dialog (just to make things clear, i do not propose to do so :)
and: it is not only wrong in "Group create" and "Group edit" - it is also wrong in "Settings / Edit-profile" and "Settings / Password and account" (and maybe others) - whereas "Settings / Show classic e-mail", "Settings / Delete message from ..." and "Settings / Theme" are fine.
We need to kick out the canEscapeKeyClose logic of blueprint and do our own thing. We need to know more about the dialog stack, which we currently don't know (which dialog is at top...)
we need to do keybindings sometime right anyway, maybe this will already come up with improving accessibility, if an dialog is open other keybindings like with chat should be disabled and you should not be able to tap around in the main app while an dialog is open and stuff like that. But that's probably a bigger thing, for making the dialog better we could just multiple ones on top of each other or add some escape listeners with the prevent default trick/hack as workaround.
Any ideas how we can do it "right"?
however, the "escape"-key closes all dialogs in a stack of dialog - eg. if you select "New chat / New group / Add members" and add some members by hand, entering a name and an icon - and finally go to Add member to check things again there and hit "Esc" there - all your work is lost.
Cannot reproduce this.
I have tried this:
After that "Add Members" dialog closes, but "New Group" is still there.
"Add Members" dialog is stacked on top of "New Group" in Desktop 1.40.2.
I can reproduce this:
usually the "escape"-key closes the most recent dialog; in a stack of dialogs, the underlying dialog is show again then (on can regard the "escape"-key as a kind of shortcut to the "cancel" or "close" button).
however, the "escape"-key closes all dialogs in a stack of dialog - eg. if you select "New chat / New group / Add members" and add some members by hand, entering a name and an icon - and finally go to Add member to check things again there and hit "Esc" there - all your work is lost.
(this is an older issue, i checked, it exists also in 1.15.5 so, no worsening in 1.20.0. maybe the issue was introduced with https://github.com/deltachat/deltachat-desktop/issues/1743)
EDIT: the Esc-key works fine at "Settings / Show Classic mail" and "Settings / Delete message from ..." - here the dialogs are also visually stacked. maybe we can see that approach as a pattern for the other dialogs? at least for future things? Cmp. directly with "Settings / Edit profile" to get the difference.