Skip to content

Commit

Permalink
SPLAT-1442 fix scroll into view call
Browse files Browse the repository at this point in the history
  • Loading branch information
amalija-ramljak committed Sep 16, 2024
1 parent 7ba832c commit 81b35e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const renderField = ({ domElement, model, editor }) => {
const changedField = model.getAttribute(attributes.changedField);
if (changedField && changedField !== 'modal') {
const field = domElement.querySelector(`[name="${changedField}"]`);
field?.scrollIntoViewIfNeeded({ behaviour: 'smooth' });
field?.scrollIntoView({ behaviour: 'smooth', block: 'center' });
field?.focus();
}

Expand Down

0 comments on commit 81b35e5

Please sign in to comment.