Skip to content

Commit

Permalink
Merge pull request #56 from hunghg255/fix-button-type-submit
Browse files Browse the repository at this point in the history
  • Loading branch information
hunghg255 authored Oct 5, 2024
2 parents e572fed + 7e8a8fa commit 22b8d7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/menus/components/ContentMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function ContentMenu(props: ContentMenuProps) {
className="richtext-w-7 richtext-h-7 richtext-cursor-grab"
disabled={props?.disabled}
onClick={handleAdd}
type="button"
>
<IconComponent name="Plus" className="richtext-text-lg richtext-text-neutral-600 dark:richtext-text-neutral-200" />
</Button>
Expand All @@ -211,12 +212,14 @@ function ContentMenu(props: ContentMenuProps) {
size="icon"
className="richtext-w-7 richtext-h-7 richtext-cursor-grab richtext-relative richtext-z-[1]"
disabled={props?.disabled}
onMouseUp={() => {
onMouseUp={(e) => {
e.preventDefault()
if (props?.disabled) {
return
}
setMenuOpen(true)
}}
type="button"
>
<IconComponent name="Grip" className="richtext-text-sm dark:richtext-text-neutral-200 richtext-text-neutral-600" />
</Button>
Expand Down

0 comments on commit 22b8d7d

Please sign in to comment.