Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import android.text.TextUtils
import android.text.TextWatcher
import android.text.method.KeyListener
import android.text.method.QwertyKeyListener
import android.text.style.CharacterStyle
import android.text.style.ParagraphStyle
import android.util.TypedValue
import android.view.ActionMode
import android.view.DragEvent
Expand Down Expand Up @@ -1242,6 +1244,12 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
} catch (e: IndexOutOfBoundsException) {
logSoftException(TAG, e)
}
// The copy only feeds measurement, so drop editor bookkeeping spans. Some of them reference
// this view's Editable (PasswordTransformationMethod.Visible), and the cache is evicted only
// from finalize(), so keeping them would keep this view reachable for good.
stripSpansOfKind(sb, Any::class.java) { span ->
span !is CharacterStyle && span !is ParagraphStyle && span !is ReactSpan
}
}

// If we don't have text, make sure we have *something* to measure.
Expand Down
Loading