From e7cebf49e5ffaefd85d82f82a6247f59a6d6861c Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Sun, 17 Jan 2021 18:15:21 +0000 Subject: [PATCH] Widgets: Implement TinyMCE on text widgets in Accessibility Mode TinyMCE was not implemented on the accessibility mode for widgets, disabling text editing fields. Change ensures that TinyMCE is initialized when accessibility mode is set up. Prior implementation hid the text widget fields if they were empty, which they always were for new widgets. Props MadtownLems, alexstine, hareesh-pillai, dariak git-svn-id: https://develop.svn.wordpress.org/trunk@49973 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/widgets/text.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/_enqueues/wp/widgets/text.js b/src/js/_enqueues/wp/widgets/text.js index 63d4d40555..ae11f16160 100644 --- a/src/js/_enqueues/wp/widgets/text.js +++ b/src/js/_enqueues/wp/widgets/text.js @@ -451,7 +451,7 @@ wp.textWidgets = ( function( $ ) { return; } - idBase = widgetForm.find( '> .widget-control-actions > .id_base' ).val(); + idBase = widgetForm.find( '.id_base' ).val(); if ( -1 === component.idBases.indexOf( idBase ) ) { return; } @@ -542,9 +542,7 @@ wp.textWidgets = ( function( $ ) { }); // Accessibility mode. - $( window ).on( 'load', function() { - component.setupAccessibleMode(); - }); + component.setupAccessibleMode(); }); };