Config "Autofocus" should be configurable instead of hardcoded in drupal_klaro.js

Created on 11 December 2024, 11 days ago

Problem/Motivation

Klaro causing unintended scrolling to bottom of page in some setups that CSS and JS load differently ( for example using Critical CSS )

Initially i added the autoFocus setting myself in hook_page_attachments_alter but i later noticed that
it is hardcoded In drupal_klaro.js there is this line of code:
settings.klaro.config.autoFocus = true;

Proposed resolution

Add a checkbox to the module settings form to let people freely choose if they want autofocus or not depending on their setup.

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡¬πŸ‡·Greece detectivepixel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024