[wp-trac] [WordPress Trac] #46280: Uncaught javascript error on comment-reply.js

WordPress Trac noreply at wordpress.org
Tue Feb 19 23:22:07 UTC 2019


#46280: Uncaught javascript error on comment-reply.js
---------------------------------------------------+---------------------
 Reporter:  xknown                                 |       Owner:  (none)
     Type:  defect (bug)                           |      Status:  new
 Priority:  normal                                 |   Milestone:  5.1
Component:  Comments                               |     Version:  trunk
 Severity:  normal                                 |  Resolution:
 Keywords:  has-patch needs-refresh needs-testing  |     Focuses:
---------------------------------------------------+---------------------

Comment (by peterwilsoncc):

 [attachment:"46280.2.diff"] builds upon the initial patch:

 * moves the `dataset` support check to the HTML element
 `document.documentElement.dataset` as the HTML element is available when
 the script is included in the HTML header. This allows the fix to touch
 fewer lines
 * Uses `document.readyState !== 'loading'` to check if the page has
 loaded, in the initial patch `document.body` can be defined before the
 form is loaded.
 * adds a check for required attributes to `clickEvent()` before calling
 `moveForm()` to allow for P2 style custom callbacks.

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


More information about the wp-trac mailing list