Skip to content

bug(textarea): Unexpected Enter Key Triggering with Modifier Keys #5610

@h2ls

Description

@h2ls

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Description:
When pressing keyboard shortcuts involving modifier keys (e.g., Ctrl+Enter or Shift+Enter), the current keyup event handling logic still triggers the Enter key callback method, leading to unintended behavior. The expected behavior is to ​only trigger the callback when the Enter key is pressed alone (without any modifier keys).

Expected Behavior

The callback should ​only fire when the Enter key is pressed alone (without Ctrl/Shift/Alt/Meta keys). Any modifier key combination should be ignored.

Interactive render mode

Interactive Server (Interactive server-side rendering (interactive SSR) using Blazor Server)

Steps To Reproduce

1. Bind the "OnEnterAsyncevent" to a textarea using handleKeyUp.

2. Press Ctrl+Enter or Shift+Enter in the textarea.

3. Observe that the enterCallbackMethod is unexpectedly triggered.

Exceptions (if any)

No response

.NET Version

NET9.0

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions