Skip to content

Commit 886cbe0

Browse files
committed
fix: button type not set
1 parent 37e13de commit 886cbe0

33 files changed

+38
-1
lines changed

packages/DropdownToolbar/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ const DropdownToolbar = (props: DropdownToolbarProps) => {
3030
overlay={props.overlay}
3131
disabled={props.disabled}
3232
>
33-
<button className={className} title={props.title || ''} disabled={props.disabled}>
33+
<button
34+
className={className}
35+
title={props.title || ''}
36+
disabled={props.disabled}
37+
type="button"
38+
>
3439
{props.children || props.trigger}
3540
</button>
3641
</Dropdown>

packages/MdEditor/layouts/Toolbar/tools/Bold.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const ToolbarBold = () => {
2222
onClick={() => {
2323
bus.emit(editorId, REPLACE, 'bold');
2424
}}
25+
type="button"
2526
>
2627
<Icon name="bold" />
2728
{showToolbarName && (

packages/MdEditor/layouts/Toolbar/tools/Catalog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const ToolbarCatalog = () => {
2828
bus.emit(editorId, CHANGE_CATALOG_VISIBLE);
2929
}}
3030
key="bar-catalog"
31+
type="button"
3132
>
3233
<Icon name="catalog" />
3334

packages/MdEditor/layouts/Toolbar/tools/Code.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const ToolbarCode = () => {
2222
onClick={() => {
2323
bus.emit(editorId, REPLACE, 'code');
2424
}}
25+
type="button"
2526
>
2627
<Icon name="code" />
2728
{showToolbarName && (

packages/MdEditor/layouts/Toolbar/tools/CodeRow.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const ToolbarCodeRow = () => {
2222
onClick={() => {
2323
bus.emit(editorId, REPLACE, 'codeRow');
2424
}}
25+
type="button"
2526
>
2627
<Icon name="code-row" />
2728
{showToolbarName && (

packages/MdEditor/layouts/Toolbar/tools/Fullscreen.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const ToolbarFullscreen = () => {
2828
onClick={() => {
2929
fullscreenHandler();
3030
}}
31+
type="button"
3132
>
3233
<Icon name={setting.fullscreen ? 'fullscreen-exit' : 'fullscreen'} />
3334

packages/MdEditor/layouts/Toolbar/tools/Github.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const ToolbarGithub = () => {
1616
onClick={() => {
1717
linkTo('https://github.com/imzbf/md-editor-v3');
1818
}}
19+
type="button"
1920
>
2021
<Icon name="github" />
2122
{showToolbarName && (

packages/MdEditor/layouts/Toolbar/tools/HtmlPreview.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const ToolbarHtmlPreview = () => {
2525
onClick={() => {
2626
updateSetting('htmlPreview');
2727
}}
28+
type="button"
2829
>
2930
<Icon name="preview-html" />
3031

packages/MdEditor/layouts/Toolbar/tools/Image.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const ToolbarImage = () => {
2222
onClick={() => {
2323
bus.emit(editorId, REPLACE, 'image');
2424
}}
25+
type="button"
2526
>
2627
<Icon name="image" />
2728
{showToolbarName && (

packages/MdEditor/layouts/Toolbar/tools/ImageDropdown.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const ToolbarImageDropdown = () => {
122122
])}
123123
title={ult.toolbarTips?.image}
124124
disabled={disabled}
125+
type="button"
125126
>
126127
<Icon name="image" />
127128
{showToolbarName && (

0 commit comments

Comments
 (0)