Skip to content

Commit 454cb87

Browse files
authored
fix(compose): Update isImportantForBounds to return true
As any inner node could be important for semantics.
1 parent 0ee65e9 commit 454cb87

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

sentry-compose/src/androidMain/kotlin/io/sentry/compose/SentryModifier.kt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ public object SentryModifier {
5555
}
5656

5757
// SemanticsModifierNode.isImportantForBounds() was added as an abstract method in
58-
// compose-ui 1.11. Classes compiled against earlier versions lack this method in
58+
// compose-ui 1.11. Classes compiled against earlier versions lack this method in
5959
// their bytecode, which causes AbstractMethodError when the accessibility tree is
60-
// traversed on 1.11+ runtimes. We can't use the `override` keyword here because
61-
// the method doesn't exist in the compile-time dependency (compose-ui 1.6.x), but
62-
// the JVM satisfies the abstract-method requirement at runtime via signature
63-
// matching. SentryTagModifierNode only stores a semantic tag and has no visual
64-
// effect on layout, so it is not important for bounds.
65-
@Suppress("unused") fun isImportantForBounds(): Boolean = false
60+
// traversed on 1.11+ runtimes.
61+
// Returning true to match the default behavior
62+
// https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/SemanticsModifierNode.kt;l=69-83;drc=bd7809b4bc9205721c2f1bc681694dd348885849
63+
@Suppress("unused") fun isImportantForBounds(): Boolean = true
6664
}
6765
}

0 commit comments

Comments
 (0)