diff --git a/src/pell.js b/src/pell.js index 3e2fe64..bb30d1c 100644 --- a/src/pell.js +++ b/src/pell.js @@ -140,7 +140,10 @@ export const init = settings => { button.innerHTML = action.icon button.title = action.title button.setAttribute('type', 'button') - button.onclick = () => action.result() && content.focus() + button.onclick = (e) => { + action.result() && content.focus() + e.preventDefault() + } if (action.state) { const handler = () => button.classList[action.state() ? 'add' : 'remove'](classes.selected)