List on body for global onRendered

This commit is contained in:
Harry Adel 2026-01-24 02:38:25 +02:00
parent 8b362a4165
commit 70825d3425

View file

@ -3,7 +3,7 @@
import { Template } from 'meteor/templating';
import { Tracker } from 'meteor/tracker';
Template.onRendered(function() {
Template.body.onRendered(function() {
Tracker.afterFlush(() => {
const el = this.find('[autofocus]');
if (el && typeof el.focus === 'function') {