Page MenuHomePhabricator

When publishing a new function, a browser confirmation dialog appears
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

(Using Firefox, not checked with other browsers)

What happens?:

A browser dialog appears, which warns that we're about to leave the page:

2022-11-22_13-04.png (441×948 px, 47 KB)

What should have happened instead?:
The publication should be effective right after the first dialog.

Software version: cbf93482049715a41c827e08cf63ffbf30a56dd0

Other information: My browser is Firefox Nightly (109.0a1 (2022-11-21))

Event Timeline

Seems like it is a side effect of this commit:

commit 3ac72623b138d3d9f4793344b87a7e752dc44ad2
Author: Dani de Waal <ddwaal-ctr@wikimedia.org>
Date:   Mon Nov 14 12:39:44 2022 -0500

    Add the default browser are you sure message when trying to reload the
    page on the function and zobject editor.

Should we somehow add exceptions when clicking on "publish" or "cancel" buttons so the browser confirmation dialog does not appear?

cc @Ddwaal-WMF

This was fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiLambda/+/858385.

We already have a custom "are you sure" dialog for clicks within the app, and as it seems you can't specify a "browser refresh" click, (and there are some browser compatibility issues), going to remove it altogether for now.

Ddwaal claimed this task.

@Ddwaal-WMF Looks good. I wonder, on WikiData, when changing content and refreshing, the content is restored.

Cannot we do the same for WikiFunctions?