This is a proof of concept of abusing the browser selection to make inline elements stretchable by the user. Inline handles (span elements) are added to each stretchable inline. We then hook up a set of mousedown / move / up event handlers to catch drag operations starting on these handles and reset the selection to cover the entire element, with the focus at the side of the clicked handle. It looks like Chrome and Firefox are quite forgiving and integrate the resulting selection into the one being created by the mouse drag!
IE is, as always, a lot more trouble:
- It doesn't seem to want to continue selecting after the selection is modified programmatically.
- It messes up most ways of styling the handles as anything vaguely block-like becomes selectable in IE's "control selection" mode, complete with being draggable and having resize handles, with no way to disable this behavior. Of course this prevents any text selections being created when starting a drag on t