Remove mquandalle:autofocus

This commit is contained in:
Harry Adel 2026-01-21 20:03:40 +02:00
parent aca661583d
commit d8495ab08f
3 changed files with 13 additions and 2 deletions

View file

@ -43,7 +43,6 @@ session@1.2.1
tracker@1.3.3
underscore@1.0.13
audit-argument-checks@1.0.7
mquandalle:autofocus
ongoworks:speakingurl
raix:handlebar-helpers
http@2.0.0! # force new http package

View file

@ -78,7 +78,6 @@ mongo-decimal@0.1.3
mongo-dev-server@1.1.0
mongo-id@1.0.8
mongo-livedata@1.0.12
mquandalle:autofocus@1.0.0
mquandalle:collection-mutations@0.1.0
mquandalle:jade@0.4.9
mquandalle:jade-compiler@0.4.5

13
client/lib/autofocus.js Normal file
View file

@ -0,0 +1,13 @@
// Native replacement for mquandalle:autofocus package
// Handles autofocus attribute in dynamically rendered Blaze templates
import { Template } from 'meteor/templating';
import { Tracker } from 'meteor/tracker';
Template.onRendered(function() {
Tracker.afterFlush(() => {
const el = this.find('[autofocus]');
if (el && typeof el.focus === 'function') {
el.focus();
}
});
});