Merge pull request #206 from lucamug/add-tests

Code example for issue #147 - Safari bug for `el` heigh calculation i…
This commit is contained in:
Matthew Griffith 2020-05-01 10:41:02 -04:00 committed by GitHub
commit d49e7b3388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,38 @@
module SafariBugIssue147 exposing (main)
{-|
# Safari bug for `el` heigh calculation in combination with `height fill`
The problem appears to be that the height of the first el is 0, and therefore the second
text is rendered on the first.
Versions
OS: macOS Mojave 10.14.5
Browser: Safari
Browser Version: 12.1.1 (14607.2.6.1.1)
Elm Version: 0.19
Elm UI Version: 1.1.5
<https://github.com/mdgriffith/elm-ui/issues/147>
I was able to pinpoint the issue using git bisect to this fd08f1a commit, which lines up.
<https://github.com/mdgriffith/elm-ui/commit/fd08f1a953484ba96f2d05037d4f208eab351514>
-}
import Browser
import Html exposing (Html)
import Testable.Element exposing (..)
main =
layout [ height fill ] <|
column
[ height fill ]
[ el [] <| text "Element that Safari gives height 0, if inside an el and not just text."
, text "Text below the el above"
]