TinyMCE: make sure the editor is not completely empty before checking if the user clicked above or below a wpView.
Fixes #31765. git-svn-id: https://develop.svn.wordpress.org/trunk@31888 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
135be2826d
commit
e12762a76c
@ -219,10 +219,15 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
body = editor.getBody(),
|
||||
bodyRect = body.getBoundingClientRect(),
|
||||
first = body.firstChild,
|
||||
firstRect = first.getBoundingClientRect(),
|
||||
last = body.lastChild,
|
||||
lastRect = last.getBoundingClientRect(),
|
||||
view;
|
||||
firstRect, lastRect, view;
|
||||
|
||||
if ( ! first || ! last ) {
|
||||
return;
|
||||
}
|
||||
|
||||
firstRect = first.getBoundingClientRect();
|
||||
lastRect = last.getBoundingClientRect();
|
||||
|
||||
if ( y < firstRect.top && ( view = getView( first ) ) ) {
|
||||
setViewCursor( true, view );
|
||||
|
Loading…
x
Reference in New Issue
Block a user