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

Code format tidying.

* Use upper-case for all tag names.
* Tidy document reference.
This commit is contained in:
Neil Jenkins 2014-06-02 10:17:00 +10:00
parent 34d3839ceb
commit aa9afdfaf6
4 changed files with 10 additions and 8 deletions

View file

@ -38,7 +38,7 @@ var useTextFixer = isIE8or9or10 || isOpera;
var cantFocusEmptyTextNodes = isIE8or9or10 || isWebKit;
var losesSelectionOnBlur = isIE8or9or10;
var hasBuggySplit = ( function () {
var div = doc.createElement( 'div' ),
var div = doc.createElement( 'DIV' ),
text = doc.createTextNode( '12' );
div.appendChild( text );
text.splitText( 2 );
@ -507,6 +507,7 @@ function mergeWithBlock ( block, next, range ) {
function mergeContainers ( node ) {
var prev = node.previousSibling,
first = node.firstChild,
doc = node.ownerDocument,
isListItem = ( node.nodeName === 'LI' ),
needsFix, block;
@ -518,7 +519,7 @@ function mergeContainers ( node ) {
if ( prev && areAlike( prev, node ) ) {
if ( !isContainer( prev ) ) {
if ( isListItem ) {
block = prev.ownerDocument.createElement( 'div' );
block = doc.createElement( 'DIV' );
block.appendChild( empty( prev ) );
prev.appendChild( block );
} else {
@ -535,7 +536,7 @@ function mergeContainers ( node ) {
mergeContainers( first );
}
} else if ( isListItem ) {
prev = node.ownerDocument.createElement( 'div' );
prev = doc.createElement( 'DIV' );
node.insertBefore( prev, first );
fixCursor( prev );
}

File diff suppressed because one or more lines are too long

View file

@ -33,7 +33,7 @@ var useTextFixer = isIE8or9or10 || isOpera;
var cantFocusEmptyTextNodes = isIE8or9or10 || isWebKit;
var losesSelectionOnBlur = isIE8or9or10;
var hasBuggySplit = ( function () {
var div = doc.createElement( 'div' ),
var div = doc.createElement( 'DIV' ),
text = doc.createTextNode( '12' );
div.appendChild( text );
text.splitText( 2 );

View file

@ -365,6 +365,7 @@ function mergeWithBlock ( block, next, range ) {
function mergeContainers ( node ) {
var prev = node.previousSibling,
first = node.firstChild,
doc = node.ownerDocument,
isListItem = ( node.nodeName === 'LI' ),
needsFix, block;
@ -376,7 +377,7 @@ function mergeContainers ( node ) {
if ( prev && areAlike( prev, node ) ) {
if ( !isContainer( prev ) ) {
if ( isListItem ) {
block = prev.ownerDocument.createElement( 'div' );
block = doc.createElement( 'DIV' );
block.appendChild( empty( prev ) );
prev.appendChild( block );
} else {
@ -393,7 +394,7 @@ function mergeContainers ( node ) {
mergeContainers( first );
}
} else if ( isListItem ) {
prev = node.ownerDocument.createElement( 'div' );
prev = doc.createElement( 'DIV' );
node.insertBefore( prev, first );
fixCursor( prev );
}