mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-30 04:29:05 +01:00
feat(frontend): show menus as bottom sheets on phones
This commit is contained in:
@@ -19,6 +19,14 @@
|
||||
// Ignore errors
|
||||
// Failing to set theme is not critical
|
||||
}
|
||||
|
||||
// Menus, selects and the palette show their keyboard highlight ring only after keyboard use
|
||||
addEventListener(
|
||||
'keydown',
|
||||
() => (document.documentElement.dataset.modality = 'keyboard'),
|
||||
true
|
||||
);
|
||||
addEventListener('pointerdown', () => delete document.documentElement.dataset.modality, true);
|
||||
</script>
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user