Page MenuHomePhabricator

Pressing escape while adding a parameter in the template data editor does not go back to the previous screen
Open, Needs TriagePublicBUG REPORT

Description

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

  • Open the template data editor for a template
  • Click "Add parameter" at the bottom
  • Press escape

What happens?:

A dialog box opens, asking if you want to discard your changes, like when you click the back arrow and then click the close button.

What should have happened instead?:

It should go back to the previous screen, like when you click the back arrow.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Related Objects

Event Timeline

Change #1025839 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/TemplateData@master] Esc key shouldn't close the dialog but go back first

https://gerrit.wikimedia.org/r/1025839

Reposting my comment on the patch here:

This should probably be upstreamed but in a way that is configurable. While in this case it makes sense that "escape" goes back, that is because the edit-template-param page is conceptually nested within the main dialog, so escape should "pop the stack".

In more linear workflows, pressing escape should probably still close the dialog.

I would suggest having a method like "getEscapeAction" in OO.ui.Dialog that returns empty string by default, and then can be overridden here to return 'back'

Change #1073244 had a related patch set uploaded (by Esanders; author: Esanders):

[oojs/ui@master] [DEPRECATING CHANGE] Implement Dialog#getEscapeAction

https://gerrit.wikimedia.org/r/1073244

Change #1073244 merged by jenkins-bot:

[oojs/ui@master] [DEPRECATING CHANGE] Implement Dialog#getEscapeAction

https://gerrit.wikimedia.org/r/1073244

@Esanders can you please clarify whether this needs to be announced as a deprecating change, or if you/other staff intend to handle the necessary updates yourselves? I read the thread on the patch about this but wanted to make sure I understand what needs to happen.

Change #1090901 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update OOUI to v0.52.1

https://gerrit.wikimedia.org/r/1090901

Change #1090901 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.51.2

https://gerrit.wikimedia.org/r/1090901

Change #1090955 had a related patch set uploaded (by Reedy; author: Anne Tomasevich):

[mediawiki/core@REL1_43] Update OOUI to v0.51.2

https://gerrit.wikimedia.org/r/1090955

Change #1090955 merged by jenkins-bot:

[mediawiki/core@REL1_43] Update OOUI to v0.51.2

https://gerrit.wikimedia.org/r/1090955