Skip to content

Markdown (M3) does not scroll in fragment details view (tablet layout) #330

Open
@johnjohndoe

Description

@johnjohndoe

Environment

  • Samsung Galaxy Tab S7 FE (SM-T733)
  • Android 14
  • com.mikepenz:multiplatform-markdown-renderer-m3:0.31.0

Context

I want to use com.mikepenz.markdown.m3.Markdown in a details view which is part of a tablet layout.

Image

Observed behavior

When I place the Markdown composable in the fragment ...

class TabletDetailsFragment : Fragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?) =
        content {
            Screen()
        }
}

@Composable
private fun Screen() {
    Box(
        Modifier
            .verticalScroll(rememberScrollState())
    ) {
//        Text(loremIpsum)
        Markdown(loremIpsum)
    }
}

... then the text is not scrollable.

See this showcase: https://github.com/johnjohndoe/multiplatform-markdown-renderer/tree/tablet_details_scrolling

Expected behavior

The Markdown text scrolls like the androidx.compose.material3.Text text does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions