# onFocusedBoundsChanged

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.[onFocusedBoundsChanged](https://developer.android.com/reference/kotlin/androidx/compose/foundation/onFocusedBoundsChanged.modifier#(androidx.compose.ui.Modifier).onFocusedBoundsChanged(kotlin.Function1))( onPositioned: (https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates?) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** onFocusedBoundsChanged doesn't reliably observe focus bounds changes through layout coordinate changes and focus changes. | Cmn |

## Functions

### Modifier.onFocusedBoundsChanged

Cmn Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/FocusedBounds.kt+function:onFocusedBoundsChanged) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.2.0) Deprecated in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.12.0)

```
fun Modifier.[onFocusedBoundsChanged](https://developer.android.com/reference/kotlin/androidx/compose/foundation/onFocusedBoundsChanged.modifier#(androidx.compose.ui.Modifier).onFocusedBoundsChanged(kotlin.Function1))(
    onPositioned: (LayoutCoordinates?) -> Unit
): Modifier
```

> [!CAUTION]
> **This function is deprecated.**   
> onFocusedBoundsChanged doesn't reliably observe focus bounds changes through layout coordinate changes and focus changes. The existing best-effort implementation has been removed, resulting in this becoming a no-op Modifier where onPositioned will never be called. Use FocusTargetModifierNode.getFocusedRect() instead to query this information on demand as needed.

Modifier.onFocusedBoundsChanged has been deprecated, and its implementation has been removed. This modifier now no-ops. To retrieve the position of a focused node, use `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.focus.FocusTargetModifierNode).getFocusedRect()` to query this information as needed.