diff --git a/app/components/OptionsMenu.vue b/app/components/OptionsMenu.vue index ac6aaf4..28e087d 100644 --- a/app/components/OptionsMenu.vue +++ b/app/components/OptionsMenu.vue @@ -11,10 +11,24 @@ const { toggleColumn, } = usePrefs() -const regionColumns = COLUMNS.filter((column) => column !== 'old') const oldDescriptionId = useId() const oldFormWikipedia = computed(() => LOCALE_OLD_FORM_WIKIPEDIA[locale.value]) +/* + * What the kyujitai column holds is worth a sentence, and a pointer can ask for + * it by hovering. A touch screen has nothing to hover with, so the tap that + * toggles the column opens the note as well, and a tap anywhere else in the + * panel puts it away. Hover therefore drives this flag rather than a :hover + * rule of its own -- a touch browser leaves :hover on whatever was tapped last, + * which would strand the note open over the panel. + */ +const oldHelp = ref(false) + +function toggleOldColumn() { + toggleColumn('old') + oldHelp.value = true +} + /** Reader preferences, each labeled by `options.` and `Hint`. */ const options = [ { key: 'flags', model: flagLabels }, @@ -25,6 +39,9 @@ const open = ref(false) const root = ref() onClickOutside(root, () => (open.value = false)) onKeyStroke('Escape', () => (open.value = false)) +watch(open, (shown) => { + if (!shown) oldHelp.value = false +})