Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
fix #172 - clicking on placeholder in FF problem
Browse files Browse the repository at this point in the history
  • Loading branch information
linkesch committed Apr 13, 2015
1 parent 6df2842 commit c4bb170
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@
$current = $(range.commonAncestorContainer);
}

// When user clicks on editor's placeholder in FF, $current el is editor itself, not the first paragraph as it should
if ($current.hasClass('medium-editor-insert-plugin')) {
$current = $current.find('p:first');
}

$p = $current.is('p') ? $current : $current.closest('p');

this.clean();
Expand Down

0 comments on commit c4bb170

Please sign in to comment.