slab / quill

Quill is a modern WYSIWYG editor built for compatibility and extensibility
https://quilljs.com
BSD 3-Clause "New" or "Revised" License
43.34k stars 3.37k forks source link

iOS auto-capitalization not working after pressing enter #4258

Open kasrak opened 3 months ago

kasrak commented 3 months ago

I'm re-filing #2632 since the issue is still present in Quill 2.

Steps for Reproduction

  1. Visit quilljs.com/playground/snow on an iOS simulator/device
  2. Focus the editor. Note how the shift key is activated for autocapitalization as expected.
  3. Type "Hello.", then press space. Note how the shift key is re-activated for autocapitalization as expected.
  4. Hit enter.

Expected behavior:

Shift key is re-activated for autocapitalization.

Actual behavior:

Shift key is not activated, so whatever you type won't be capitalized.

Platforms:

iOS 17 Safari

Version:

2.0.2

anishjain123 commented 1 month ago

@kasrak HAve you found any solution for this?

kasrak commented 1 month ago

Unfortunately not

kasrak commented 2 weeks ago

I believe the underlying cause for this, #4346, and #4347 is that Quill calls preventDefault() on Enter, which prevents all the built-in OS behaviors. I tried over-riding all the Enter keybindings, but there is this empty handler: https://github.com/slab/quill/blob/b213e1073bac1478649f26e3c0dad50ad0eb2a49/packages/quill/src/modules/keyboard.ts#L88