Skip to content

Commit

Permalink
Minor changes: Remove references to embed intent, add FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
bantic committed Apr 14, 2016
1 parent f1faa73 commit 46e50be
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/js/editor/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,7 @@ class PostEditor {
*/
replaceSection(section, newSection) {
if (!section) {
// The section may be undefined if the user used the embed intent
// ("+" icon) to insert a new "ul" section in a blank post
// FIXME should a falsy section be a valid argument?
this.insertSectionBefore(this.editor.post.sections, newSection, null);
} else {
this._replaceSection(section, [newSection]);
Expand Down
1 change: 1 addition & 0 deletions src/js/utils/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const Cursor = class Cursor {
}

selectedText() {
// FIXME remove this
return this.selection.toString();
}

Expand Down
3 changes: 0 additions & 3 deletions tests/acceptance/basic-editor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ test('clicking outside the editor does not raise an error', (assert) => {

Helpers.dom.triggerEvent(editorElement, 'click');

// Embed intent uses setTimeout, so this assertion must
// setTimeout after it to catch the exception during failure
// cases.
setTimeout(() => {
assert.ok(true, 'can click external item without error');
secondEditor.destroy();
Expand Down

0 comments on commit 46e50be

Please sign in to comment.