elm / browser

Create Elm programs that run in browsers!
https://package.elm-lang.org/packages/elm/browser/latest/
BSD 3-Clause "New" or "Revised" License
313 stars 64 forks source link

Debugger of 1.0.2 breaks SVG which uses fixed positioning #92

Closed malaire closed 4 years ago

malaire commented 4 years ago

After updating elm/browser from version 1.0.1 to 1.0.2 the following app is broken when using --debug and while debugger window is NOT opened. While debugger window is opened app works correctly.

While broken the SVG is garbled (see images below) and program is nearly frozen.

Ellie: https://ellie-app.com/77w3QFJC7HDa1

Browser: Firefox 68.2.0esr OS: Debian 10 "Buster"

With elm/browser 1.0.1:

before

With elm/browser 1.0.2:

after

malaire commented 4 years ago

I simplified this example a bit too much. Originally it also had e.g. message triggered with mouse movement, which was not getting triggered while SVG was garbled, showing that program is frozen. (Original code where I noticed the problem is my svg-drag-2 example.)

robinheghan commented 4 years ago

This is not a bug in the debugger.

You're applying css to every svg on the page, telling the svg to fill the screen. Since the debugger button now is a svg, it fills the screen on top of the svg you're trying to display. Changing the css in your example to target the svg by id makes it work:

ellie: https://ellie-app.com/77yTDWDcqzQa1