mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
Handle old browsers w/o range.getBoundingClientRect
This commit is contained in:
parent
072a2d9fce
commit
4ca3b20b8a
3 changed files with 5 additions and 3 deletions
|
@ -2504,7 +2504,8 @@ proto._createRange =
|
||||||
};
|
};
|
||||||
|
|
||||||
proto.getCursorPosition = function ( range ) {
|
proto.getCursorPosition = function ( range ) {
|
||||||
if ( !range && !( range = this.getSelection() ) ) {
|
if ( ( !range && !( range = this.getSelection() ) ) ||
|
||||||
|
!range.getBoundingClientRect ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Get the bounding rect
|
// Get the bounding rect
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -300,7 +300,8 @@ proto._createRange =
|
||||||
};
|
};
|
||||||
|
|
||||||
proto.getCursorPosition = function ( range ) {
|
proto.getCursorPosition = function ( range ) {
|
||||||
if ( !range && !( range = this.getSelection() ) ) {
|
if ( ( !range && !( range = this.getSelection() ) ) ||
|
||||||
|
!range.getBoundingClientRect ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Get the bounding rect
|
// Get the bounding rect
|
||||||
|
|
Loading…
Reference in a new issue