guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.5k stars 245 forks source link

Fixes #204 and #153. #248

Closed chanon closed 9 years ago

chanon commented 10 years ago

Makes sure this.range is defined when calling selection.getContaining and selection.placeMarkers. Also makes sure the current selection is inside the scribe element before placing markers. Fixes #204 and #153.

OliverJAsh commented 10 years ago

This is a duplicate of https://github.com/guardian/scribe/pull/231.

chanon commented 10 years ago

Yes, the difference is it fixes the issue with less changes to the source and also fixes #153

hmgibson23 commented 10 years ago

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.

hmgibson23 commented 10 years ago

:+1: