datatable broken in safari & ios
See original GitHub issueDescribe the bug
I have a simple application with a data table. It misrenders in safari. The table rows are appearing next to the header instead of below.
To Reproduce
data class Foo(val foo:String)
render("#target") {
val s = storeOf(listOf(Foo("foo"), Foo("bar"), Foo("foobar")))
val fooLens = buildLens<Foo, String>(
id = "fooCol",
getter = { it.foo },
setter = { old, v -> old.copy(foo = v) })
val selected = storeOf<Foo?>(null)
s.data.render {
dataTable(rows = s, rowIdProvider = { it.foo }, selection = selected) {
columns() {
column(title = "Foo") {
lens(fooLens)
}
}
}
}
}
Expected behavior
rows appear below each other
Screenshots
Desktop (please complete the following information):
- MacOS / IOS
- Safari
- Fritz 0.13
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
What could cause DataTables to break on iOS devices (Safari)?
I decided to check out this issue and connect to the app on my own iPad. There I noticed that the DataTable is...
Read more >Datatables iOS, Safari not showing at all - Stack Overflow
My issue was resolved with the latest version of the library.
Read more >[DataTable] 1st column blank on iOS Safari narrow screens
On my iPhone 6S with iOS 12 in portrait mode, on Safari or inside Shopify mobile app, Data Table's 1st row appears blank:....
Read more >Data-table not working on old iOS browser safari and chrome
Hi,. I am using data-table, it works fine on latest browsers, thanks for the great product. But I did test it on an...
Read more >Context Menu not working on IOS - Prime Community Forum
On Android, long pressing opens the Contextmenu, but it is not working on Iphone (both Safari and Chrome). Could anyone help me?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe just document this in the readme of the component library. Something like :
Safari’s quirk mode has several known issues with Fritz2 components. Fritz2 components relies on html5 and css standard behavior. To prevent browsers such as Safari from engaging their quirks mode, put
<!doctype html>
at the top of yourindex.html
.Thanks, I played a bit with this to figure out what causes this. At first glance all the differences are trivial. So, I narrowed it down by trying things one by one.
It turns out that adding this at the top of our index.html fixes things:
Safari apparently goes into some legacy/quirks mode without that: https://hsivonen.fi/doctype/
Never knew that was a thing. Probably worth documenting.