0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Fix wrong method name & invalid this.

This commit is contained in:
Neil Jenkins 2013-07-17 16:13:29 +10:00
parent 02a647c574
commit 731a1da910
3 changed files with 5 additions and 5 deletions

View file

@ -1904,7 +1904,7 @@ var splitBlock = function ( block, node, offset ) {
// Make sure the new node is the correct type.
if ( nodeAfterSplit.nodeName !== splitTag ) {
block = this.createElement( splitTag );
block = createElement( nodeAfterSplit.ownerDocument, splitTag );
block.className = nodeAfterSplit.dir === 'rtl' ? 'dir-rtl' : '';
block.dir = nodeAfterSplit.dir;
replaceWith( nodeAfterSplit, block );
@ -2615,7 +2615,7 @@ var mapKeyToFormat = function ( tag ) {
// you delete all text inside an inline tag, remove the inline tag.
var afterDelete = function ( self ) {
try {
var range = self._getSelection(),
var range = self.getSelection(),
node = range.startContainer,
parent;
if ( node.nodeType === TEXT_NODE ) {

File diff suppressed because one or more lines are too long

View file

@ -857,7 +857,7 @@ var splitBlock = function ( block, node, offset ) {
// Make sure the new node is the correct type.
if ( nodeAfterSplit.nodeName !== splitTag ) {
block = this.createElement( splitTag );
block = createElement( nodeAfterSplit.ownerDocument, splitTag );
block.className = nodeAfterSplit.dir === 'rtl' ? 'dir-rtl' : '';
block.dir = nodeAfterSplit.dir;
replaceWith( nodeAfterSplit, block );
@ -1568,7 +1568,7 @@ var mapKeyToFormat = function ( tag ) {
// you delete all text inside an inline tag, remove the inline tag.
var afterDelete = function ( self ) {
try {
var range = self._getSelection(),
var range = self.getSelection(),
node = range.startContainer,
parent;
if ( node.nodeType === TEXT_NODE ) {