mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Comments: Check if comment form element exists before adding a key handler to detect the cmd/ctrl-enter key press.
Follow-up to [45790]. Props raamdev. Fixes #48543. See #41545. git-svn-id: https://develop.svn.wordpress.org/trunk@46700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -106,7 +106,9 @@ window.addComment = ( function( window ) {
|
||||
}
|
||||
};
|
||||
|
||||
commentFormElement.addEventListener( 'keydown', submitFormHandler );
|
||||
if ( commentFormElement ) {
|
||||
commentFormElement.addEventListener( 'keydown', submitFormHandler );
|
||||
}
|
||||
|
||||
var links = replyLinks( context );
|
||||
var element;
|
||||
|
||||
Reference in New Issue
Block a user