sproutcore/rich-text-editor — pull request #23 by mysterlune (2014-11-13 23:33:04+00:00)
Title: Clicking links in the editor view do not direct to new window location

Allows for link clicks to trigger a `window.open` call to target `_blank`. Currently, clicking a link simply puts the editor into `isFirstResponder`, which is not consistent with user expectation.

The approach here is to simply modify the editor's `mouseDown` event handler to detect whether the `event.target` is an anchor tag AND whether the editor has `isFirstResponder`.

A user story here might be "As a user, if I click a link in the editor while NOT editing content, the link should open a new window/tab and display the linked webpage." And "... if I click a link while IN editing mode, place the caret within the link text so that I can modify the link using the toolbar tool, if needed."

Unit test provided.