Skip to content

Editor shouldHandleKey not being called (again) #285

Open
@easiwriter

Description

@easiwriter

I've done more digging and discovered that Proton calls

func editor(_ editor: EditorView, shouldHandle key: EditorKey, modifierFlags: UIKeyModifierFlags, at range: NSRange, handled: inout Bool) { }

This does nothing, because it has not been overridden.

Whereas the documentation has this, which is what my code calls:

func editor(_ editor: EditorView, shouldHandle key: EditorKey, at range: NSRange, handled: inout Bool)

This possibly explains why Proton doesn't call it.

I added the modifierFlags to my call and it works, so it looks like there could either be a documentation error, or I didn't see it in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions