mirror of
https://github.com/codex-team/editor.js
synced 2024-06-01 05:22:35 +02:00
fix ios shift (#2696)
This commit is contained in:
parent
1028577521
commit
c48fca1be3
|
@ -11,6 +11,7 @@
|
||||||
- `Fix` - Search input autofocus loosing after Block Tunes opening
|
- `Fix` - Search input autofocus loosing after Block Tunes opening
|
||||||
- `Fix` - Block removing while Enter press on Block Tunes
|
- `Fix` - Block removing while Enter press on Block Tunes
|
||||||
– `Fix` – Unwanted scroll on first typing on iOS devices
|
– `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
|
### 2.29.1
|
||||||
|
|
||||||
|
|
|
@ -279,8 +279,12 @@ export default class BlockEvents extends Module {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow to create line breaks by Shift+Enter
|
* 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue