fix(reader): popover dismiss on PDF taps; notes save on create; colors don't close editor
- The in-book pointerdown dismiss listener lived in the reflowable-only block, so PDF taps never closed the selection popover — hoist it so every content doc (EPUB, PDF, comics) dismisses on tap. - createHighlight hardcoded note_text: '' — 'Highlight with note' saved the highlight but silently dropped the note. Send p.note (and pass it to the EPUB overlayer). - saveHighlightChanges collapsed the note editor on every save; color dots in create mode created a highlight outright. With the editor open, color dots now just recolor (create) or recolor-and-save with the editor kept open (edit).
This commit is contained in:
@@ -139,7 +139,13 @@ templ Reader(user User, metadata ReaderMetadata) {
|
||||
:style="'background-color:' + c"
|
||||
:title="selectionPopover.mode === 'create' ? 'Highlight' : 'Set color'"
|
||||
:aria-label="'Highlight color ' + c"
|
||||
@click="selectionPopover.mode === 'create' ? createHighlight(c) : (selectionPopover.color = c, saveHighlightChanges())"
|
||||
@click="selectionPopover.noteOpen
|
||||
? (selectionPopover.mode === 'create'
|
||||
? (selectionPopover.color = c)
|
||||
: (selectionPopover.color = c, saveHighlightChanges(true)))
|
||||
: (selectionPopover.mode === 'create'
|
||||
? createHighlight(c)
|
||||
: (selectionPopover.color = c, saveHighlightChanges()))"
|
||||
></button>
|
||||
</template>
|
||||
<div class="w-px h-5 reader-sep"></div>
|
||||
|
||||
Reference in New Issue
Block a user