Commit 7c3c2a20 by Matjaz Gregoric Committed by Tim Krones

Set focus to first input when switching tab.

parent cd434ea6
...@@ -137,6 +137,7 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -137,6 +137,7 @@ function DragAndDropEditBlock(runtime, element, params) {
$fbkTab.addClass('hidden'); $fbkTab.addClass('hidden');
$zoneTab.removeClass('hidden'); $zoneTab.removeClass('hidden');
self.scrollToTop(); self.scrollToTop();
$zoneTab.find('input:first').focus();
$(this).one('click', function loadThirdTab(e) { $(this).one('click', function loadThirdTab(e) {
// $zoneTab -> $itemTab // $zoneTab -> $itemTab
...@@ -157,6 +158,7 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -157,6 +158,7 @@ function DragAndDropEditBlock(runtime, element, params) {
$zoneTab.addClass('hidden'); $zoneTab.addClass('hidden');
$itemTab.removeClass('hidden'); $itemTab.removeClass('hidden');
self.scrollToTop(); self.scrollToTop();
$itemTab.find('input:first').focus();
$(this).addClass('hidden'); $(this).addClass('hidden');
$('.save-button', element).parent() $('.save-button', element).parent()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment