Skip to content

Commit f28f062

Browse files
fix: consider css ui v4 support when calculating outline width
1 parent 1802d71 commit f28f062

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/browser/client-scripts/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,14 @@ function getElementCaptureRect(element, opts) {
321321

322322
function getExtRect(css, clientRect, allowViewportOverflow) {
323323
var shadows = parseBoxShadow(css.boxShadow),
324-
outline = parseInt(css.outlineWidth, 10);
324+
outlineWidth = parseInt(css.outlineWidth, 10),
325+
outlineStyle = css.outlineStyle;
325326

326-
if (isNaN(outline)) {
327-
outline = 0;
327+
if (isNaN(outlineWidth) || outlineStyle === "none") {
328+
outlineWidth = 0;
328329
}
329330

330-
return adjustRect(clientRect, shadows, outline, allowViewportOverflow);
331+
return adjustRect(clientRect, shadows, outlineWidth, allowViewportOverflow);
331332
}
332333

333334
function parseBoxShadow(value) {

0 commit comments

Comments
 (0)