Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#28353 closed defect (bug) (fixed)

Changes are not saved in Visual editor until autosave runs

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: azaozz's profile azaozz
Milestone: 4.0 Priority: high
Severity: major Version: 4.0
Component: Editor Keywords: needs-patch
Focuses: javascript Cc:

Description

  1. Go to "Add New Post" screen.
  2. Insert an image or enter some text in Visual editor.
  3. Quickly switch to Text editor. It will be blank.
  4. Switch back to Visual editor. It will be blank too.

If you wait for autosave to run, the changes will be saved.

If you enter the text in Text editor first and then switch to Visual editor, the changes will be saved too. However:

  1. Enter some text in Text editor.
  2. Switch to Visual editor and make some changes.
  3. Switch back to Text editor. Your changes will be lost.

Introduced in [28568].

Change History (4)

#1 @azaozz
9 years ago

Confirmed, caused by change in the events order in https://github.com/tinymce/tinymce/commit/4422a8b6b7c9da3f958c648992cc53767b700607 (self.hidden = true is set before self.save()). Fix coming up.

#2 @SergeyBiryukov
9 years ago

  • Milestone changed from Awaiting Review to 4.0

#3 @azaozz
9 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 28576:

TinyMCE: fix saving the editor content on switching Visual -> Text, fixes #28353

#4 @azaozz
9 years ago

Also fixed upstream: https://github.com/tinymce/tinymce/commit/e29575553d7aae8177992ce7b1f3b2a015488732. Will go back to using editor.isHidden() after the next TinyMCE update.

Note: See TracTickets for help on using tickets.