Skip to content

Commit 49b1c06

Browse files
authored
fix(Textarea): set UseShiftEnter to true not work (#6059)
* fix(Textarea): update javascript for shift+enter key combination event * chore: bump version 9.6.4-beta04
1 parent 6d1860f commit 49b1c06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.6.4-beta03</Version>
4+
<Version>9.6.4-beta04</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Textarea/Textarea.razor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Data from "../../modules/data.js"
33
import EventHandler from "../../modules/event-handler.js"
44

55
export function init(id) {
6-
var el = document.getElementById(id);
6+
const el = document.getElementById(id);
77
const text = {
88
prevMethod: '',
99
element: el
@@ -14,7 +14,7 @@ export function init(id) {
1414
if (e.key === "Enter" || e.key === "NumpadEnter") {
1515
const useShiftEnter = el.getAttribute('data-bb-shift-enter') === 'true';
1616
const shiftKey = e.shiftKey;
17-
if (shiftKey && useShiftEnter) {
17+
if (useShiftEnter && shiftKey === false) {
1818
e.preventDefault();
1919
}
2020
}

0 commit comments

Comments
 (0)