Which product are you using?
PDF.js Express Plus
PDF.js Express Version
UI version: 8.7.0
Core version: 8.7.5
Detailed description of issue
I would like to disable a button but to continue to show it to users. I’ve tried adding a event listener on the button and prevent the default behaviour. Is there a way to do this?
Expected behaviour
The button would be clicked but the display would not change.
Does your issue happen with every document, or just one?
Every document
Link to document
Not applicable
Code snippet
const ele = document.querySelector('[data-element="signatureToolGroupButton"]');
ele.addEventListener('click', (event) => {
event.preventDefault();
});
instance.Core.documentViewer.addEventListener('toolModeUpdated', async (newToolMode, oldToolMode) => {
console.log('toolModeUpdated');
console.log('newToolMode');
console.log(newToolMode);
console.log('oldToolMode');
console.log(oldToolMode);
});