Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32818 closed enhancement (fixed)

Prompt before switching comments, leaving page, updating post whilst editing a comment in the edit post screen

Reported by: polevaultweb Owned by: chriscct7
Priority: normal Milestone: 4.6
Component: Comments Version:
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses: administration

Description

This was proposed here https://core.trac.wordpress.org/ticket/29457#comment:4 by @chriscct7.

  1. Edit any post or page that has at least one comment in the post editor.
  2. Make changes to the comment / add new comment
  3. Attempt to leave the page in the browser, update the post, or click quick edit on another comment.
  4. The changes are lost.

We need to prompt the user that their changes will be lost and handle the response.

Similar implementation that can possibly be leveraged - https://core.trac.wordpress.org/attachment/ticket/21845/21845.3.patch

Would need to build on the solution of https://core.trac.wordpress.org/ticket/29457#comment:4 when dealing with a user updating the post during a comment edit.

Attachments (3)

32818.diff​ (2.7 KB ) - added by polevaultweb 11 years ago.
32818.2.diff​ (3.1 KB ) - added by polevaultweb 11 years ago.
Patch refreshed
32818.patch​ (2.8 KB ) - added by rachelbaker 11 years ago.
Refresh with minor documentation and function name edits

Download all attachments as: .zip

Change History (11)

#1 @chriscct7
11 years ago

  • Focuses administration added
  • Version trunk

#2 @chriscct7
11 years ago

  • Keywords needs-patch added

#3 @rachelbaker
11 years ago

  • Milestone Awaiting Review → Future Release

Makes sense to me, moving to Future Release awaiting a patch.

#4 @polevaultweb
11 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#5 @chriscct7
11 years ago

  • Owner set to chriscct7
  • Status new → accepted

@polevaultweb
11 years ago

Patch refreshed

#6 @polevaultweb
11 years ago

@chriscct7 still applying cleanly - can we get into 4.6?

#7 @rachelbaker
11 years ago

  • Milestone Future Release → 4.6

@rachelbaker
11 years ago

Refresh with minor documentation and function name edits

#8 @rachelbaker
11 years ago

  • Resolution → fixed
  • Status accepted → closed

In 37303:

Comments: Keep comments safe in the Edit Post screen.

Warns users that have added a new Comment or began editing an existing without saving their changes, before they press the “update” button which would wipe out their comment changes.

Fixes #32818.

Props polevaultweb.

Note: See TracTickets for help on using tickets.