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

Handle old browsers w/o range.getBoundingClientRect

This commit is contained in:
Neil Jenkins 2016-03-24 21:25:14 +11:00
parent 072a2d9fce
commit 4ca3b20b8a
3 changed files with 5 additions and 3 deletions

View file

@ -2504,7 +2504,8 @@ proto._createRange =
};
proto.getCursorPosition = function ( range ) {
if ( !range && !( range = this.getSelection() ) ) {
if ( ( !range && !( range = this.getSelection() ) ) ||
!range.getBoundingClientRect ) {
return null;
}
// Get the bounding rect

File diff suppressed because one or more lines are too long

View file

@ -300,7 +300,8 @@ proto._createRange =
};
proto.getCursorPosition = function ( range ) {
if ( !range && !( range = this.getSelection() ) ) {
if ( ( !range && !( range = this.getSelection() ) ) ||
!range.getBoundingClientRect ) {
return null;
}
// Get the bounding rect