Skip to content

Commit

Permalink
fix ios shift (codex-team#2696)
Browse files Browse the repository at this point in the history
  • Loading branch information
neSpecc authored Apr 27, 2024
1 parent 1028577 commit c48fca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- `Fix` - Search input autofocus loosing after Block Tunes opening
- `Fix` - Block removing while Enter press on Block Tunes
`Fix` – Unwanted scroll on first typing on iOS devices
- `Fix` - Unwanted soft line break on Enter press after period and space (". |") on iOS devices

### 2.29.1

Expand Down
6 changes: 5 additions & 1 deletion src/components/modules/blockEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,12 @@ export default class BlockEvents extends Module {

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

Expand Down

0 comments on commit c48fca1

Please sign in to comment.