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

WordPress Trac noreply at wordpress.org
Fri Apr 4 21:45:56 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:  has-patch     |     Focuses:  javascript
--------------------------+-------------------------
Changes (by adamsilverstein):

 * keywords:   => has-patch


Comment:

 Replying to [comment:4 davidmarichal]:
 > 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.

 Excellent, tried the fiddle and the approach makes sense. Could maybe use
 more testing in trunk, seems good though - thanks!

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


More information about the wp-trac mailing list