mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Use first background repeat value for multiple backgrounds if only 1 available (Edge bug)
This commit is contained in:
parent
0224592a96
commit
82a7349e43
@ -128,14 +128,17 @@ export const cloneWindow = (
|
||||
if (
|
||||
/(iPad|iPhone|iPod)/g.test(navigator.userAgent) &&
|
||||
(cloneWindow.scrollY !== bounds.top ||
|
||||
cloneWindow.scrollX !== bounds.left)
|
||||
cloneWindow.scrollX !== bounds.left)
|
||||
) {
|
||||
documentClone.documentElement.style.top = -bounds.top + 'px';
|
||||
documentClone.documentElement.style.left = -bounds.left + 'px';
|
||||
documentClone.documentElement.style.position = 'absolute';
|
||||
}
|
||||
}
|
||||
if (referenceElementSearch[1] instanceof cloneWindow.HTMLElement || referenceElementSearch[1] instanceof HTMLElement) {
|
||||
if (
|
||||
referenceElementSearch[1] instanceof cloneWindow.HTMLElement ||
|
||||
referenceElementSearch[1] instanceof HTMLElement
|
||||
) {
|
||||
resolve([cloneIframeContainer, referenceElementSearch[1]]);
|
||||
} else {
|
||||
reject(
|
||||
|
@ -292,7 +292,9 @@ const parseBackgroundImages = (
|
||||
|
||||
return {
|
||||
source,
|
||||
repeat: parseBackgroundRepeat(repeats[index]),
|
||||
repeat: parseBackgroundRepeat(
|
||||
typeof repeats[index] === 'string' ? repeats[index] : repeats[0]
|
||||
),
|
||||
size: size.length < 2 ? [size[0], AUTO_SIZE] : [size[0], size[1]],
|
||||
position: position.length < 2 ? [position[0], position[0]] : [position[0], position[1]]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user