func textViewShouldReturn()

in Sources/TwitterTextEditor/TextEditorView.swift [1757:1771]


    func textViewShouldReturn(_ textView: TextView) -> Bool {
        log(type: .debug)

        guard returnToEndEditingEnabled else {
            return true
        }

        // Return `false` from this delegate will keep `isUserInteractionBeingProcessed` to `true`.
        // However, setting `isEditing` to `false` calls `textViewDidEndEditing(_:)` that is currently calling
        // `userInteractionDidChangeTextViewScheduler.perform()`, which eventually sets `isUserInteractionBeingProcessed` to `false`.
        // See `userInteractionDidChangeTextView()`.
        isEditing = false

        return false
    }