From 91acd00d7220399cabf2afa39fc80be7a0123d08 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 25 Nov 2019 13:49:22 +0000 Subject: [PATCH] Widgets: Avoid to move focus to the Image Widget "Insert from URL" field. Fixes a bug after [45499], where the backbone view element isn't the input field any longer. Also, managing focus programmatically is often an assumption on a specific user flow and should generally be avoided, see #43169. Props dufresnesteven, afercia. Merges [46745] to the 5.3 branch. See #43169. Fixes #48588. git-svn-id: https://develop.svn.wordpress.org/branches/5.3@46781 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/widgets/media.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/js/_enqueues/wp/widgets/media.js b/src/js/_enqueues/wp/widgets/media.js index 31d093b42d..9a243a914b 100644 --- a/src/js/_enqueues/wp/widgets/media.js +++ b/src/js/_enqueues/wp/widgets/media.js @@ -417,10 +417,6 @@ wp.mediaWidgets = ( function( $ ) { }).render(); this.content.set( view ); - - if ( ! wp.media.isTouchDevice ) { - view.url.focus(); - } } });