Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix auto scrolling in Chrome #67
In recent Chrome versions, taking the offset/position of a 0-width and 0-height span element always returns 0. This PR changes the style of the marker
This addresses #50 (comment).
NB: for convenience, I also included in this PR a commit with a recent build of parchment.
I tried to apply this patch to what I've got over at https://github.com/Quuxplusone/Advent/tree/gh-pages , but it seems to make my problems on Chrome even worse! Bear in mind I'm using a version of Parchment (and the corresponding Inform7-generated index.html) from 2016 and I'm probably doing something wrong. However:
Pre-patch (Quuxplusone/Advent@36e2e28), the symptom on Chrome is that the gameport doesn't autoscroll; it gets a scroll bar and you have to manually scroll down after every input.
Post-patch (Quuxplusone/Advent@9e081bf), the symptom on both Chrome and Firefox seemed to be that the gameport doesn't autoscroll and doesn't get a scrollbar! It just overflows off the bottom of the page and there's no way to see what's going on down there because you can't scroll. But then I backed my change out and reapplied it and refreshed the page, and then I couldn't reproduce that new symptom; it just went back to the old pre-patch symptom.
But I admit that my CSS is all screwed up. Maybe I'm doing something else wrong? Could I ask you to clone my repo and see if you can get it to work in Chrome?
I think you also need this change: