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:
@@ -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
Reference in New Issue
Block a user