don't deselect on click, only scroll if not in view
This commit is contained in:
parent
2c5c56c036
commit
9c765bf863
2 changed files with 10 additions and 8 deletions
|
|
@ -113,9 +113,7 @@ function getText(book, cfiRange, cb) {
|
|||
|
||||
function onHighlightClicked(e) {
|
||||
console.log("highlight clicked", e.target.dataset.epubcfi);
|
||||
if(e.target.classList.contains('selected')) {
|
||||
e.target.classList.remove('selected')
|
||||
} else {
|
||||
if(!e.target.classList.contains('selected')) {
|
||||
document.querySelectorAll('.epubjs-hl.selected').forEach(function(other) {
|
||||
other.classList.remove('selected')
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue