mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Fix issue with line height calculation when using older versions of jQuery
This commit is contained in:
@@ -58,7 +58,11 @@
|
||||
},
|
||||
|
||||
getLineHeight: function(elem) {
|
||||
return parseInt($(elem)['offsetParent' in $.fn ? 'offsetParent' : 'parent']().css('fontSize'), 10);
|
||||
var $parent = $(elem)['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
|
||||
if (!$parent.length) {
|
||||
$parent = $('body');
|
||||
}
|
||||
return parseInt($parent.css('fontSize'), 10);
|
||||
},
|
||||
|
||||
getPageHeight: function(elem) {
|
||||
|
||||
Reference in New Issue
Block a user