Skip to content

Confirmation popup displays when closing browser tab when page hasn't changed #4687

@maddisondesigns

Description

@maddisondesigns

Issue Overview

If I open an existing page, and then decide to close it straight away (because maybe I opened the wrong one), I'm prompted with a popup message, even when the page hasn't been touched or edited.

This happens on both Drafts and Published pages.

I raised a similar issue back in November (#3447). This was closed in favour of #3296, advising that it had been fixed in v1.7. Subsequently, #3296 has now also been closed. This issue has obviously resurfaced again.

screenshot_580

Steps to Reproduce (for bugs)

  1. Open existing page in a new browser tab
  2. Close new browser tab
  3. View popup that appears

Expected Behavior

If I haven't edited the page, I shouldn't be advised that I could be losing changes by closing the tab

Current Behavior

I'm advised that I could lose changes by continuing on, even those nothing has changed

Possible Solution

Don't mark the page as dirty when it hasn't changed

Related Issues and/or PRs

#3447
#3296

Firefox Quantum 57.0.4 (64-bit)
WordPress 4.9.2
Gutenberg 2.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Feature] SavingRelated to saving functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions