[wp-trac] [WordPress Trac] #27657: Clicking 'Publish' before autosave fires does not publish a post

WordPress Trac noreply at wordpress.org
Fri Apr 4 19:52:55 UTC 2014


#27657: Clicking 'Publish' before autosave fires does not publish a post
--------------------------+-------------------------
 Reporter:  jeremyfelt    |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  3.9
Component:  Autosave      |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript
--------------------------+-------------------------
Changes (by davidmarichal):

 * keywords:  needs-patch =>


Comment:

 The blur event has the property [https://developer.mozilla.org/en-
 US/docs/Web/API/event.relatedTarget relatedTarget].

 The publish button is set as the relatedTarget if clicked. So then on
 blur, I check if the relatedTarget is equal to any of the submit buttons
 and return false. ([http://jsfiddle.net/S8FHq/2/ jsFiddle])

 Hope this fixes the issue.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27657#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list