curiousdannii / parchment

The Interactive Fiction web app
https://iplayif.com
MIT License
424 stars 60 forks source link

Fixed webkit scrolling bug #2

Closed apsillers closed 12 years ago

apsillers commented 12 years ago

As i mentioned on the Google Group discussion, WebKit provides the string "normal" instead of a pixel value for the line-height CSS property, so parseFloat returns NaN. This breaks the scollTop call in structio/input.js. My fix accepts "normal", a pixel value, or a ratio for line-height. Note that I'm just making a guess of 140% of font-size for "normal", but it seem to work okay. You may revise the guess if you like, but there's no "good" way to get the actual ratio or pixel value unless it's explicitly set in the CSS.

For this commit, I did not rebuild the minified files, because I'm sending you another pull request shortly, and I don't know which ones you'll accept (so I won't rebuild incompatible binaries for each separate pull request).

curiousdannii commented 12 years ago

I fixed this myself in a slightly different way, but thanks!