1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 17:24:46 +02:00

Fix issue where collapsed repeater in fieldset (where repeater is only field in fieldset), when clicking to un-collapse repeater, it would jump to top of page

This commit is contained in:
Ryan Cramer
2017-11-19 06:33:22 -05:00
parent 81a07fde34
commit 32b3da7b0d
2 changed files with 6 additions and 4 deletions

View File

@@ -1083,11 +1083,13 @@ function InputfieldStates($target) {
if($li.hasClass('InputfieldNoFocus')) return;
var $input = $li.find(":input:visible");
if($input.length == 1 && !$input.is('button')) {
if($input.css('position') != 'absolute') {
var t = $input.attr('type');
if($input.is('textarea') || t == 'text' || t == 'email' || t == 'url' || t == 'number') {
$input.focus();
}
}
}
} else {
$li.trigger('closed');
if($li.hasClass('InputfieldColumnWidth')) $li.children('.InputfieldContent').hide();

File diff suppressed because one or more lines are too long