Closed chanon closed 9 years ago
This is a duplicate of https://github.com/guardian/scribe/pull/231.
Yes, the difference is it fixes the issue with less changes to the source and also fixes #153
Okay I'm happy to merge this - but in regards to the issues in #231, I think @OliverJAsh might have some opinions about it. Although checking for a range makes sense to me as does checking that we're actually in the scribe.el. The selection does get set if focus is outside the scribe.el - just try selecting the whole page and it happens.
:+1:
Makes sure
this.range
is defined when callingselection.getContaining
andselection.placeMarkers
. Also makes sure the current selection is inside the scribe element before placing markers. Fixes #204 and #153.