-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LocalLayoutDirection
isn't propagated into DialogWindow
#3382
Comments
The new common |
Indeed. This is because |
Although there's now the same issue with |
The problem still exists with fun main() {
application {
var direction by remember { mutableStateOf(LayoutDirection.Rtl) }
CompositionLocalProvider(LocalLayoutDirection provides direction) {
DialogWindow(onCloseRequest = ::exitApplication) {
// /* Workaround: */ CompositionLocalProvider(LocalLayoutDirection provides direction) {
Column(modifier = Modifier.fillMaxWidth()) {
Text("$direction")
Button(onClick = { direction = if (direction == LayoutDirection.Rtl) LayoutDirection.Ltr else LayoutDirection.Rtl }) {
Text("Change direction")
}
}
// }
}
}
}
} |
LocalLayoutDirection
isn't propagated into Dialog
LocalLayoutDirection
isn't propagated into DialogWindow
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Describe the bug
Creating this bug as was requested here: #3142 (comment)
LocalLayoutDirection.current
returns LTR even when set to RTL outside aDialog
.Affected platforms
Select one of the platforms below:
Versions
Expected behavior
The provided layout direction should be seen inside the dialog composable.
The text was updated successfully, but these errors were encountered: