From f52c3ac951a6746acd9430fc8737acad431799f8 Mon Sep 17 00:00:00 2001 From: Carlos Bravo <37012961+cbravobernal@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:08:10 +0200 Subject: [PATCH] Remove clogs --- .../themes/wporg-developer-2023/js/user-notes.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/wp-content/themes/wporg-developer-2023/js/user-notes.js b/source/wp-content/themes/wporg-developer-2023/js/user-notes.js index 9554d20e..b708792b 100644 --- a/source/wp-content/themes/wporg-developer-2023/js/user-notes.js +++ b/source/wp-content/themes/wporg-developer-2023/js/user-notes.js @@ -31,7 +31,6 @@ if ( ! comment.length ) { return; } - console.log( 'patata' ); // Scroll to top level comment and adjust for admin bar. const pos = comment.getBoundingClientRect(); window.scrollTo( { @@ -51,7 +50,6 @@ top: offsetTop - wpAdminBar - 16, behavior: 'smooth', } ); - console.log( 'patata' ); } ); } ); @@ -60,7 +58,6 @@ if ( target ) { const pos = target.getBoundingClientRect(); const offsetTop = pos.top + window.scrollY; - console.log( 'patata' ); window.scrollTo( { top: offsetTop - wpAdminBar, behavior: 'smooth', @@ -78,7 +75,6 @@ element.addEventListener( 'click', function ( e ) { e.preventDefault(); showCommentForm(); - console.log( 'patata' ); } ); } ); @@ -94,16 +90,14 @@ let scroll, sel; if ( e.key === 'Escape' ) { - // escape key - // when pressing Escape: Opera 12 and 27 blur form fields, IE 8 clears them + console.log( 'Escape' ); + // When pressing Escape: Opera 12 and 27 blur form fields, IE 8 clears them. e.preventDefault(); element_target.setAttribute( 'data-tab-out', 'true' ); return; } - if ( e.key !== 'Tab' || e.ctrlKey || e.altKey || e.shiftKey ) - // tab key - return; + if ( e.key !== 'Tab' || e.ctrlKey || e.altKey || e.shiftKey ) return; if ( element_target.getAttribute( 'data-tab-out' ) === 'true' ) { element_target.setAttribute( 'data-tab-out', 'false' );