[BUGFIX] Add focus on input field for Online Media in modal 84/43484/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 22 Sep 2015 18:48:21 +0000 (20:48 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 23 Sep 2015 13:24:49 +0000 (15:24 +0200)
Resolves: #70027
Releases: master
Change-Id: I899d1ba565f3e22110b5fef513aa8cef5054c042
Reviewed-on: http://review.typo3.org/43484
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Resources/Public/JavaScript/OnlineMedia.js

index 33c810f..231ee6e 100644 (file)
@@ -91,6 +91,10 @@ define('TYPO3/CMS/Backend/OnlineMedia', ['jquery', 'nprogress', 'TYPO3/CMS/Lang/
                                }]
                        );
 
+                       $modal.on('shown.bs.modal', function(e) {
+                               // focus the input field
+                               $(this).find('input.online-media-url').first().focus();
+                       });
                });
        };