4 ms·
I'm far from an HTML expert, but there are a few things that absolutely need to be done The HTML Way™: scrolling - both in terms of event dispatch, and in term
by o11c 3y ago
I'm far from an HTML expert, but there are a few things that absolutely need to be done The HTML Way™:
scrolling - both in terms of event dispatch, and in terms of sizing (incorrect absolute positioning can break this), possibly focus as well. I don't pretend to understand under what exact circumstances the spacebar works for pagedown, but it's certainly something that fails often on fancy webpages but works intuitively on simple ones.
copy-paste. No, middle click is not just another way of meaning ctrl-v, I want the correct buffer dammit!
rich text editing is poorly supported however you do it, but be sure to have a fallback to a plain text mode that uses the browser controls
- taeric 3y agoI mean... yes, if you are building a webpage, you should consider the capabilities of the web browser. I'd be surprised if copy/paste is something you want in your game. Scrolling for a game is again something you probably have specific ideas on. You could make it so that a side scroller builds everything so that html scrolling gets what you want. Odds are high that you'd have an easier time taking over a lot of that on your own. (Indeed, this is essentially how popular mapping "tiles" work. You don't have all tiles in the DOM, but play with the ones visible to work as desired.) And what I mean for absolute positioning is more in line with what I do in https://taeric.github.io/cube-permutations-1.html https://taeric.github.io/cube-permutations-1.html. And even there, I do not keep some things in state such that I have no control over the actual path a face travels as it moves into its new current spot.