mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
handle case in hidden iframes - fixes #171
This commit is contained in:
@@ -152,9 +152,8 @@ const Split = (idsOption, options = {}) => {
|
|||||||
// behavior will be whacky otherwise.
|
// behavior will be whacky otherwise.
|
||||||
const firstElement = elementOrSelector(ids[0])
|
const firstElement = elementOrSelector(ids[0])
|
||||||
const parent = firstElement.parentNode
|
const parent = firstElement.parentNode
|
||||||
const parentFlexDirection = getComputedStyle
|
const parentStyle = getComputedStyle ? getComputedStyle(parent) : null
|
||||||
? getComputedStyle(parent).flexDirection
|
const parentFlexDirection = parentStyle ? parentStyle.flexDirection : null
|
||||||
: null
|
|
||||||
|
|
||||||
// Set default options.sizes to equal percentages of the parent element.
|
// Set default options.sizes to equal percentages of the parent element.
|
||||||
let sizes = getOption(options, 'sizes') || ids.map(() => 100 / ids.length)
|
let sizes = getOption(options, 'sizes') || ids.map(() => 100 / ids.length)
|
||||||
@@ -352,6 +351,9 @@ const Split = (idsOption, options = {}) => {
|
|||||||
if (!getComputedStyle) return null
|
if (!getComputedStyle) return null
|
||||||
|
|
||||||
const computedStyle = getComputedStyle(element)
|
const computedStyle = getComputedStyle(element)
|
||||||
|
|
||||||
|
if (!computedStyle) return null
|
||||||
|
|
||||||
let size = element[clientSize]
|
let size = element[clientSize]
|
||||||
|
|
||||||
if (size === 0) return null
|
if (size === 0) return null
|
||||||
|
|||||||
Reference in New Issue
Block a user