Skip to content

Commit c48fca1

Browse files
authored
fix ios shift (#2696)
1 parent 1028577 commit c48fca1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- `Fix` - Search input autofocus loosing after Block Tunes opening
1212
- `Fix` - Block removing while Enter press on Block Tunes
1313
`Fix` – Unwanted scroll on first typing on iOS devices
14+
- `Fix` - Unwanted soft line break on Enter press after period and space (". |") on iOS devices
1415

1516
### 2.29.1
1617

src/components/modules/blockEvents.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ export default class BlockEvents extends Module {
279279

280280
/**
281281
* Allow to create line breaks by Shift+Enter
282+
*
283+
* Note. On iOS devices, Safari automatically treats enter after a period+space (". |") as Shift+Enter
284+
* (it used for capitalizing of the first letter of the next sentence)
285+
* We don't need to lead soft line break in this case — new block should be created
282286
*/
283-
if (event.shiftKey) {
287+
if (event.shiftKey && !_.isIosDevice) {
284288
return;
285289
}
286290

0 commit comments

Comments
 (0)