mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-01 08:16:03 +00:00
Improved Webkit and Gecko :empty selector.
But the real block level unfocusable bug is still not solved.
This commit is contained in:
@@ -60,12 +60,14 @@
|
||||
.squire-wysiwyg div:-moz-only-whitespace {
|
||||
min-height: 1em;
|
||||
}
|
||||
.squire-wysiwyg div:empty:before,
|
||||
.squire-wysiwyg div:-moz-only-whitespace:before {
|
||||
/*
|
||||
.squire-wysiwyg div:empty::before,
|
||||
.squire-wysiwyg div:-moz-only-whitespace::before {
|
||||
content: "Start writing here…";
|
||||
opacity: 0.5;
|
||||
position: absolute
|
||||
-moz-user-select: text;
|
||||
}
|
||||
*/
|
||||
|
||||
.squire-wysiwyg, .squire-plain {
|
||||
min-height: 200px;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user