Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh: Use NcDialog to confirm leaving #1880

Merged
merged 1 commit into from Jan 28, 2024
Merged

Conversation

Chartman123
Copy link
Collaborator

@Chartman123 Chartman123 commented Jan 17, 2024

This uses NcDialog for warning the user before leaving an unsubmitted form instead of the default confirm dialog of the browsers. Due to limitations of the browsers this only works for route changes within the Forms app. When switching to other apps, another website or closing the tab/window, the default dialog will still be used.

@Chartman123 Chartman123 added enhancement New feature or request javascript Javascript related ticket 2. developing Work in progress design Related to the design feature: 📝 submitting responses labels Jan 17, 2024
@Chartman123 Chartman123 added this to the 4.1 milestone Jan 17, 2024
@Chartman123 Chartman123 self-assigned this Jan 17, 2024
Copy link
Collaborator

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe like this?

src/views/Submit.vue Outdated Show resolved Hide resolved
src/views/Submit.vue Show resolved Hide resolved
src/views/Submit.vue Outdated Show resolved Hide resolved
src/views/Submit.vue Outdated Show resolved Hide resolved
@Chartman123 Chartman123 marked this pull request as ready for review January 24, 2024 21:05
@Chartman123 Chartman123 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jan 24, 2024
@Chartman123 Chartman123 force-pushed the enh/use-ncdialog-leave branch 2 times, most recently from 32aca08 to af34179 Compare January 25, 2024 13:27
@susnux
Copy link
Collaborator

susnux commented Jan 25, 2024

I get the dialog even if no answers were entered?

vokoscreenNG-2024-01-25_17-57-56.mp4

@Chartman123
Copy link
Collaborator Author

I get the dialog even if no answers were entered?

Should be fixed now :)

src/components/TopBar.vue Outdated Show resolved Hide resolved
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
@Chartman123 Chartman123 merged commit 6add163 into main Jan 28, 2024
37 checks passed
@Chartman123 Chartman123 deleted the enh/use-ncdialog-leave branch January 28, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews design Related to the design enhancement New feature or request feature: 📝 submitting responses javascript Javascript related ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants