Skip to content
Closed
Show file tree
Hide file tree
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 numberDiff line numberDiff line change
Expand Up@@ -62,6 +62,7 @@ import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISA
import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END
import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_START
import com.facebook.react.views.scroll.ReactScrollViewHelper.findNextFocusableView
import com.facebook.react.views.view.ImportantForInteractionHelper
import com.facebook.systrace.Systrace
import kotlin.math.abs
import kotlin.math.ceil
Expand DownExpand Up@@ -175,6 +176,11 @@ constructor(context: Context, private val fpsListener: FpsListener? = null) :
private var pendingContentOffsetX = UNSET_CONTENT_OFFSET
private var pendingContentOffsetY = UNSET_CONTENT_OFFSET
public open var pointerEvents: PointerEvents = PointerEvents.AUTO
set(value) {
field = value
ImportantForInteractionHelper.setImportantForInteraction(this, value, _overflow)
}

private var contentView: View? = null
private var maintainVisibleContentPositionHelper:
MaintainVisibleScrollPositionHelper<ReactHorizontalScrollView>? =
Expand DownExpand Up@@ -425,6 +431,7 @@ constructor(context: Context, private val fpsListener: FpsListener? = null) :
else Overflow.SCROLL,
)
}
ImportantForInteractionHelper.setImportantForInteraction(this, pointerEvents, _overflow)
invalidate()
}

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<1ad8f84ac759d8d225ce0fd57dccea7b>>
* @generated SignedSource<<21f8ac172eefdbfa94cab925e21d7a99>>
*/

/**
Expand DownExpand Up@@ -64,6 +64,7 @@ import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISA
import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END
import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_START
import com.facebook.react.views.scroll.ReactScrollViewHelper.findNextFocusableView
import com.facebook.react.views.view.ImportantForInteractionHelper
import com.facebook.systrace.Systrace
import kotlin.math.abs
import kotlin.math.ceil
Expand DownExpand Up@@ -112,6 +113,10 @@ constructor(context: Context, private val fpsListener: FpsListener? = null) :
override var hasChildPressedStateDelay: Boolean? = null

public open var pointerEvents: PointerEvents = PointerEvents.AUTO
set(value) {
field = value
ImportantForInteractionHelper.setImportantForInteraction(this, value, _overflow)
}

public open var fadingEdgeLengthStart: Int = 0
set(value) {
Expand DownExpand Up@@ -393,6 +398,7 @@ constructor(context: Context, private val fpsListener: FpsListener? = null) :
else Overflow.SCROLL,
)
}
ImportantForInteractionHelper.setImportantForInteraction(this, pointerEvents, _overflow)
invalidate()
}

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,6 +56,7 @@ import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISA
import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END
import com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_START
import com.facebook.react.views.scroll.ReactScrollViewHelper.findNextFocusableView
import com.facebook.react.views.view.ImportantForInteractionHelper
import com.facebook.systrace.Systrace
import kotlin.math.abs
import kotlin.math.ceil
Expand DownExpand Up@@ -104,6 +105,10 @@ constructor(context: Context, private val fpsListener: FpsListener? = null) :
override var hasChildPressedStateDelay: Boolean? = null

public open var pointerEvents: PointerEvents = PointerEvents.AUTO
set(value) {
field = value
ImportantForInteractionHelper.setImportantForInteraction(this, value, _overflow)
}

public open var fadingEdgeLengthStart: Int = 0
set(value) {
Expand DownExpand Up@@ -385,6 +390,7 @@ constructor(context: Context, private val fpsListener: FpsListener? = null) :
else Overflow.SCROLL,
)
}
ImportantForInteractionHelper.setImportantForInteraction(this, pointerEvents, _overflow)
invalidate()
}

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,6 +21,7 @@ import com.facebook.react.uimanager.IViewGroupManager
import com.facebook.react.uimanager.LayoutShadowNode
import com.facebook.react.uimanager.LengthPercentage
import com.facebook.react.uimanager.LengthPercentageType
import com.facebook.react.uimanager.PointerEvents
import com.facebook.react.uimanager.ReactStylesDiffMap
import com.facebook.react.uimanager.ReferenceStateWrapper
import com.facebook.react.uimanager.StateWrapper
Expand All@@ -33,6 +34,7 @@ import com.facebook.react.uimanager.style.BorderStyle
import com.facebook.react.uimanager.style.LogicalEdge
import com.facebook.react.uimanager.style.Overflow
import com.facebook.react.views.text.ReactTextViewAccessibilityDelegate.AccessibilityLinks
import com.facebook.react.views.view.ImportantForInteractionHelper
import java.util.HashMap

@ReactModule(name = PreparedLayoutTextViewManager.REACT_CLASS)
Expand DownExpand Up@@ -109,6 +111,12 @@ internal class PreparedLayoutTextViewManager :
@ReactProp(name = "overflow")
fun setOverflow(view: PreparedLayoutTextView, overflow: String?): Unit {
view.overflow = Overflow.fromString(overflow)
ImportantForInteractionHelper.setImportantForInteraction(
view,
// <Text> has no pointerEvents prop, so it always behaves as AUTO.
PointerEvents.AUTO,
view.overflow,
)
}

@ReactProp(name = "accessible")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -676,4 +676,8 @@ public void setOverflow(@Nullable String overflow) {
mOverflow = Overflow.fromString(overflow);
invalidate();
}

/* package */ Overflow getOverflow() {
return mOverflow;
}
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,7 @@ import com.facebook.react.uimanager.IViewManagerWithChildren
import com.facebook.react.uimanager.LayoutShadowNode
import com.facebook.react.uimanager.LengthPercentage
import com.facebook.react.uimanager.LengthPercentageType
import com.facebook.react.uimanager.PointerEvents
import com.facebook.react.uimanager.ReactStylesDiffMap
import com.facebook.react.uimanager.ReferenceStateWrapper
import com.facebook.react.uimanager.StateWrapper
Expand All@@ -44,6 +45,7 @@ import com.facebook.react.uimanager.style.BorderStyle.Companion.fromString
import com.facebook.react.uimanager.style.LogicalEdge
import com.facebook.react.views.text.DefaultStyleValuesUtil.getDefaultTextColorHighlight
import com.facebook.react.views.text.ReactTypefaceUtils.getFontWeightAdjustment
import com.facebook.react.views.view.ImportantForInteractionHelper
import java.util.HashMap

/** View manager for `<Text>` nodes. */
Expand DownExpand Up@@ -236,6 +238,12 @@ public constructor(
@ReactProp(name = "overflow")
public fun setOverflow(view: ReactTextView, overflow: String?) {
view.setOverflow(overflow)
ImportantForInteractionHelper.setImportantForInteraction(
view,
// <Text> has no pointerEvents prop, so it always behaves as AUTO.
PointerEvents.AUTO,
view.overflow,
)
}

@ReactProp(name = "accessible")
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -140,7 +140,9 @@ public open class ReactEditText public constructor(context: Context) : AppCompat
private var didAttachToWindow = false
private var selectTextOnFocus = false
private var placeholder: String? = null
private var overflow = Overflow.VISIBLE
internal var overflow = Overflow.VISIBLE
private set

private var wasMultiline = false

public var stateWrapper: StateWrapper? = null
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,6 +46,7 @@ import com.facebook.react.uimanager.BaseViewManager
import com.facebook.react.uimanager.LayoutShadowNode
import com.facebook.react.uimanager.LengthPercentage
import com.facebook.react.uimanager.LengthPercentageType
import com.facebook.react.uimanager.PointerEvents
import com.facebook.react.uimanager.ReactStylesDiffMap
import com.facebook.react.uimanager.StateWrapper
import com.facebook.react.uimanager.ThemedReactContext
Expand DownExpand Up@@ -73,6 +74,7 @@ import com.facebook.react.views.text.ReactTypefaceUtils.getFontWeightAdjustment
import com.facebook.react.views.text.ReactTypefaceUtils.parseFontVariant
import com.facebook.react.views.text.TextAttributeProps
import com.facebook.react.views.text.TextLayoutManager
import com.facebook.react.views.view.ImportantForInteractionHelper
import java.util.LinkedList

/** Manages instances of TextInput. */
Expand DownExpand Up@@ -882,6 +884,12 @@ public open class ReactTextInputManager public constructor() :
@ReactProp(name = "overflow")
public fun setOverflow(view: ReactEditText, overflow: String?) {
view.setOverflow(overflow)
ImportantForInteractionHelper.setImportantForInteraction(
view,
// <TextInput> has no pointerEvents prop, so it always behaves as AUTO.
PointerEvents.AUTO,
view.overflow,
)
}

override fun onAfterUpdateTransaction(view: ReactEditText) {
Expand Down
Loading