atproto explorer pdsls.dev
atproto tool

remove 100ms scrolling delay in lexicon schema view

juli.ee 28b5578b d0c8bb28

verified
Changed files
+2 -6
src
components
+2 -6
src/components/lexicon-schema.tsx
···
const hash = location.hash;
if (hash.startsWith("#schema:")) {
const defName = hash.slice(8);
-
setTimeout(() => {
-
const element = document.getElementById(`def-${defName}`);
-
if (element) {
-
element.scrollIntoView({ behavior: "instant", block: "start" });
-
}
-
}, 100);
+
const element = document.getElementById(`def-${defName}`);
+
if (element) element.scrollIntoView({ behavior: "instant", block: "start" });
}
});