mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Related https://github.com/the-djmaze/snappymail/issues/28
This commit is contained in:
parent
4946feada3
commit
075762000b
1 changed files with 5 additions and 3 deletions
8
vendors/squire/build/squire-raw.js
vendored
8
vendors/squire/build/squire-raw.js
vendored
|
|
@ -46,6 +46,8 @@ const
|
||||||
|
|
||||||
indexOf = (array, value) => Array.prototype.indexOf.call(array, value),
|
indexOf = (array, value) => Array.prototype.indexOf.call(array, value),
|
||||||
|
|
||||||
|
filterAccept = NodeFilter.FILTER_ACCEPT,
|
||||||
|
|
||||||
typeToBitArray = {
|
typeToBitArray = {
|
||||||
// ELEMENT_NODE
|
// ELEMENT_NODE
|
||||||
1: 1,
|
1: 1,
|
||||||
|
|
@ -108,7 +110,7 @@ const
|
||||||
isBlock = node => getNodeCategory( node ) === BLOCK,
|
isBlock = node => getNodeCategory( node ) === BLOCK,
|
||||||
isContainer = node => getNodeCategory( node ) === CONTAINER,
|
isContainer = node => getNodeCategory( node ) === CONTAINER,
|
||||||
createTreeWalker = (root, whatToShow, filter) => doc.createTreeWalker( root, whatToShow, filter ? {
|
createTreeWalker = (root, whatToShow, filter) => doc.createTreeWalker( root, whatToShow, filter ? {
|
||||||
acceptNode: node => filter(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP
|
acceptNode: node => filter(node) ? filterAccept : NodeFilter.FILTER_SKIP
|
||||||
} : null
|
} : null
|
||||||
),
|
),
|
||||||
getBlockWalker = ( node, root ) => {
|
getBlockWalker = ( node, root ) => {
|
||||||
|
|
@ -2732,7 +2734,7 @@ proto.getSelectedText = function () {
|
||||||
let addedTextInBlock = false;
|
let addedTextInBlock = false;
|
||||||
let value;
|
let value;
|
||||||
|
|
||||||
if ( !walker.filter( node ) ) {
|
if ( filterAccept != walker.filter.acceptNode( node ) ) {
|
||||||
node = walker.nextNode();
|
node = walker.nextNode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3220,7 +3222,7 @@ proto._addFormat = function ( tag, attributes, range ) {
|
||||||
|
|
||||||
// Make sure we start with a valid node.
|
// Make sure we start with a valid node.
|
||||||
walker.currentNode = startContainer;
|
walker.currentNode = startContainer;
|
||||||
if ( !walker.filter( startContainer ) ) {
|
if ( filterAccept != walker.filter.acceptNode( startContainer ) ) {
|
||||||
startContainer = walker.nextNode();
|
startContainer = walker.nextNode();
|
||||||
startOffset = 0;
|
startOffset = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue