mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Improved Webkit and Gecko :empty selector.
But the real block level unfocusable bug is still not solved.
This commit is contained in:
parent
fca5a0e290
commit
a8ddeecb49
2 changed files with 8 additions and 7 deletions
7
vendors/squire/build/squire-raw.js
vendored
7
vendors/squire/build/squire-raw.js
vendored
|
|
@ -241,7 +241,7 @@ const
|
|||
|
||||
fixCursor = ( node, root ) => {
|
||||
// In Webkit and Gecko, block level elements are collapsed and
|
||||
// unfocusable if they have no content. To remedy this, a <BR> must be
|
||||
// unfocusable if they have no content (:empty). To remedy this, a <BR> must be
|
||||
// inserted. In Opera and IE, we just need a textnode in order for the
|
||||
// cursor to appear.
|
||||
let self = root.__squire__;
|
||||
|
|
@ -281,10 +281,9 @@ const
|
|||
fixer = doc.createTextNode( '' );
|
||||
}
|
||||
}
|
||||
} else if ( !node.querySelector( 'BR' ) ) {
|
||||
// } else if ( !node.querySelector( 'BR' ) ) {
|
||||
} else if ( node.matches( ':empty' ) ) {
|
||||
fixer = createElement( doc, 'BR' );
|
||||
// fixer = doc.createTextNode( ZWS );
|
||||
// fixer = doc.createTextNode( NBSP );
|
||||
while ( ( child = node.lastElementChild ) && !isInline( child ) ) {
|
||||
node = child;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue