1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 00:37:02 +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,9 +1083,11 @@ function InputfieldStates($target) {
if($li.hasClass('InputfieldNoFocus')) return;
var $input = $li.find(":input:visible");
if($input.length == 1 && !$input.is('button')) {
var t = $input.attr('type');
if($input.is('textarea') || t == 'text' || t == 'email' || t == 'url' || t == 'number') {
$input.focus();
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 {

File diff suppressed because one or more lines are too long