When clicking on a bullet point Logseq navigates to a view of the block and it’s children. I think this feature is called Click to Zoom or Focus Mode. Is it possible to disable this feature on both the desktop and mobile app?
I tried using css to disable the click event, however it also stopped the shift click and right click context menu from working too.
Try adding the following code inside file custom.js
:
const bullets = document.getElementsByClassName('bullet-container');
const bulletsObserver = new MutationObserver( ()=>{
Array.prototype.forEach.call(bullets, (span)=>{
if (span.dataset.unzoomable) return
span.dataset.unzoomable = true
span.addEventListener('click', (e)=>{
if (!e.shiftKey && e.button === 0) {
e.stopImmediatePropagation()
}
})
})
});
bulletsObserver.observe(document.getElementById('app-container'), {
childList: true,
subtree: true
});
Restart Logseq and accept the confirmation.
2 Likes
Thank you @mentaloid that works perfectly on both the desktop and android app.
For future Logseq users, you need to create the custom.js file in <logseq-graph-name>/logseq/custom.js
The custom.js files isn’t created by default.
1 Like