Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/Dialog/FormDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const FormDialog = <
<button
className='str-chat__dialog__controls-button str-chat__dialog__controls-button--cancel'
onClick={close}
type='button'
>
{t('Cancel')}
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/MessageInput/EditMessageForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const EditMessageForm = () => {
className='str-chat__edit-message-cancel'
data-testid='cancel-button'
onClick={cancel}
type='button'
>
{t('Cancel')}
</button>
Expand Down
3 changes: 2 additions & 1 deletion src/components/Poll/PollCreationDialog/OptionFieldSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export const OptionFieldSet = () => {
});
}}
onKeyUp={(event) => {
if (event.key === 'Enter') {
const isFocusedLastOptionField = i === options.length - 1;
if (event.key === 'Enter' && !isFocusedLastOptionField) {
const nextInputId = options[i + 1].id;
document.getElementById(nextInputId)?.focus();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const PollCreationDialogControls = ({
messageComposer.pollComposer.initState();
close();
}}
type='button'
>
{t('Cancel')}
</button>
Expand Down
Loading