@carto/meridian-ds 2.13.0 → 2.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  ## 2.0
6
6
 
7
+ ### 2.13.1
8
+
9
+ - Fix: prevent IME composition (Japanese, Chinese, Korean input) from triggering message submission in MessageField [#383](https://github.com/CartoDB/meridian-ds/pull/383/)
10
+
7
11
  ### 2.13.0
8
12
 
9
13
  - Fix: revert package version and remove disabled cursor override from form inputs [#384](https://github.com/CartoDB/meridian-ds/pull/384)
@@ -5446,7 +5446,8 @@ function _MessageField({
5446
5446
  const buttonIsDisabled = currentValue === "" || disabledButton || disabled;
5447
5447
  const handleKeyDown = (e) => {
5448
5448
  if (e.key === "Enter") {
5449
- if (e.ctrlKey || e.shiftKey) {
5449
+ if (e.nativeEvent.isComposing) ;
5450
+ else if (e.ctrlKey || e.shiftKey) {
5450
5451
  e.preventDefault();
5451
5452
  const textarea = e.target;
5452
5453
  const cursorPosition = e.target.selectionStart;
@@ -5430,7 +5430,8 @@ function _MessageField({
5430
5430
  const buttonIsDisabled = currentValue === "" || disabledButton || disabled;
5431
5431
  const handleKeyDown = (e) => {
5432
5432
  if (e.key === "Enter") {
5433
- if (e.ctrlKey || e.shiftKey) {
5433
+ if (e.nativeEvent.isComposing) ;
5434
+ else if (e.ctrlKey || e.shiftKey) {
5434
5435
  e.preventDefault();
5435
5436
  const textarea = e.target;
5436
5437
  const cursorPosition = e.target.selectionStart;
@@ -1 +1 @@
1
- {"version":3,"file":"MessageField.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageField/MessageField.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AA+K3C,QAAA,MAAM,YAAY,2HAA4B,CAAA;AAG9C,eAAe,YAAY,CAAA"}
1
+ {"version":3,"file":"MessageField.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageField/MessageField.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAmL3C,QAAA,MAAM,YAAY,2HAA4B,CAAA;AAG9C,eAAe,YAAY,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/meridian-ds",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "CARTO Meridian Design System",
5
5
  "type": "module",
6
6
  "scripts": {