Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Fix Scribe adding links to other contenteditables #522

Merged
merged 1 commit into from
Aug 10, 2018

Conversation

RichieAHB
Copy link
Contributor

@RichieAHB RichieAHB commented Aug 9, 2018

This PR stops Scribe throwing it's links around into other contenteditable nodes. This probably could be widened to ignore any commands when Scribe doesn't have a selection or focus, but the surface area of this PR would increase by a factor of 100 and I have no idea what it might break.

Recommend reading this diff in split view!

@@ -101,35 +101,36 @@ define(function () {
nodeHelpers.getAncestor(node, scribe.el, nodeFilter);
};

Selection.prototype.placeMarkers = function () {
Selection.prototype.isInScribe = function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff doesn't really show this nicely but placeMarkers still exists but it has functionality to check whether the selection was in Scribe that I broke out into a method that could be used in create-link.

@RichieAHB RichieAHB merged commit ac9bf8f into master Aug 10, 2018
@RichieAHB RichieAHB deleted the rahb/fix-scribe-commands branch August 10, 2018 09:31
RichieAHB added a commit that referenced this pull request Aug 10, 2018
Fix Scribe adding links to other contenteditables
@mbarton mbarton mentioned this pull request Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants