Page MenuHomePhabricator

Clicking on 'Esc' key discards new discussion being created without user consent
Open, Needs TriagePublic

Description

Clicking on the 'Esc' button when editing a discussion asks the user whether to discard the edit or not through the "Are you sure?" modal. The same doesn't happen when creating a new flow topic especially when the topic has been given a title!

Steps to reproduce

  1. Open 2017 wikitext editor/Feedback
  2. Click on "Start a new topic"
  3. Enter "Test title" in the title space
  4. Enter "Lorem ipsom ..." in the topic description space
  5. Tap on the 'Esc' key

Expected results

The "Are you sure?" modal is shown to ask for user consent whether to discard the change or not.

Actual results

The "Are you sure?" modal is not shown to ask for user consent.

Note

The "Are you sure?" modal is shown to ask for user consent when the title is not entered (Step 3).

Environment details

BrowserFirefox Nightly 60.0a1
OSDebian GNU/Linux 9 (stretch)
SkinVector (default)

See T142011: Clicking escape after switching from wikitext to visual editor mode will hide the draft and T96531: Flow not warning me when I leave an edit page with unsaved changes.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Currently in testwiki, 'Esc' key will behave as the following:

Type titleType to postclick Esc-Result
Test-Discarded without confirmation
the order is important (1)Test(2)TestThe confirmation is displayed
-TestDiscarded without confirmation
the order is important (2)Test(1)TestDiscarded without confirmation

Note: (1)Test (2)Test - means, Type first in the title and then in the post area.

@Etonkovidova This is odder than what I noted! Surprisingly the user is given a frustrating experience more than a "THAT was close!" experience.