mirror of
https://github.com/fastmail/Squire.git
synced 2025-01-03 13:16:31 -05:00
Fix wrong method name & invalid this
.
This commit is contained in:
parent
02a647c574
commit
731a1da910
3 changed files with 5 additions and 5 deletions
|
@ -1904,7 +1904,7 @@ var splitBlock = function ( block, node, offset ) {
|
||||||
|
|
||||||
// Make sure the new node is the correct type.
|
// Make sure the new node is the correct type.
|
||||||
if ( nodeAfterSplit.nodeName !== splitTag ) {
|
if ( nodeAfterSplit.nodeName !== splitTag ) {
|
||||||
block = this.createElement( splitTag );
|
block = createElement( nodeAfterSplit.ownerDocument, splitTag );
|
||||||
block.className = nodeAfterSplit.dir === 'rtl' ? 'dir-rtl' : '';
|
block.className = nodeAfterSplit.dir === 'rtl' ? 'dir-rtl' : '';
|
||||||
block.dir = nodeAfterSplit.dir;
|
block.dir = nodeAfterSplit.dir;
|
||||||
replaceWith( nodeAfterSplit, block );
|
replaceWith( nodeAfterSplit, block );
|
||||||
|
@ -2615,7 +2615,7 @@ var mapKeyToFormat = function ( tag ) {
|
||||||
// you delete all text inside an inline tag, remove the inline tag.
|
// you delete all text inside an inline tag, remove the inline tag.
|
||||||
var afterDelete = function ( self ) {
|
var afterDelete = function ( self ) {
|
||||||
try {
|
try {
|
||||||
var range = self._getSelection(),
|
var range = self.getSelection(),
|
||||||
node = range.startContainer,
|
node = range.startContainer,
|
||||||
parent;
|
parent;
|
||||||
if ( node.nodeType === TEXT_NODE ) {
|
if ( node.nodeType === TEXT_NODE ) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -857,7 +857,7 @@ var splitBlock = function ( block, node, offset ) {
|
||||||
|
|
||||||
// Make sure the new node is the correct type.
|
// Make sure the new node is the correct type.
|
||||||
if ( nodeAfterSplit.nodeName !== splitTag ) {
|
if ( nodeAfterSplit.nodeName !== splitTag ) {
|
||||||
block = this.createElement( splitTag );
|
block = createElement( nodeAfterSplit.ownerDocument, splitTag );
|
||||||
block.className = nodeAfterSplit.dir === 'rtl' ? 'dir-rtl' : '';
|
block.className = nodeAfterSplit.dir === 'rtl' ? 'dir-rtl' : '';
|
||||||
block.dir = nodeAfterSplit.dir;
|
block.dir = nodeAfterSplit.dir;
|
||||||
replaceWith( nodeAfterSplit, block );
|
replaceWith( nodeAfterSplit, block );
|
||||||
|
@ -1568,7 +1568,7 @@ var mapKeyToFormat = function ( tag ) {
|
||||||
// you delete all text inside an inline tag, remove the inline tag.
|
// you delete all text inside an inline tag, remove the inline tag.
|
||||||
var afterDelete = function ( self ) {
|
var afterDelete = function ( self ) {
|
||||||
try {
|
try {
|
||||||
var range = self._getSelection(),
|
var range = self.getSelection(),
|
||||||
node = range.startContainer,
|
node = range.startContainer,
|
||||||
parent;
|
parent;
|
||||||
if ( node.nodeType === TEXT_NODE ) {
|
if ( node.nodeType === TEXT_NODE ) {
|
||||||
|
|
Loading…
Reference in a new issue