diff --git a/wax-prosemirror-components/src/components/Button.js b/wax-prosemirror-components/src/components/Button.js index 9354174abf8f18c9c4191dfcbd83e9156ca26b19..d5c254ef3f995396d0f41baf9e2c834eb931f11f 100644 --- a/wax-prosemirror-components/src/components/Button.js +++ b/wax-prosemirror-components/src/components/Button.js @@ -32,7 +32,7 @@ const Button = ({ view = {}, item }) => { const { dispatch, state } = view; const handleClick = e => { - // e.preventDefault(); + e.preventDefault(); run(state, dispatch); }; @@ -66,7 +66,7 @@ const Button = ({ view = {}, item }) => { active={isActive} disabled={isDisabled} iconName={icon} - onClick={handleClick} + onClick={e => handleClick(e)} title={title} /> ); diff --git a/wax-prosemirror-components/src/ui/buttons/MenuButton.js b/wax-prosemirror-components/src/ui/buttons/MenuButton.js index d80da6252cb2fa4b10050b792fde0004b4e876a7..ef7f5dad887653a3a132ca1326c84f02b5a70832 100644 --- a/wax-prosemirror-components/src/ui/buttons/MenuButton.js +++ b/wax-prosemirror-components/src/ui/buttons/MenuButton.js @@ -83,7 +83,7 @@ const MenuButton = props => { active={active} className={className} disabled={disabled} - onClick={onClick} + onMouseDown={e => onClick(e)} title={title} > {iconName && (