1
0
Эх сурвалжийг харах

fix: scroll element to screenshot into center

Ahmad Kholid 2 жил өмнө
parent
commit
65c1ee4ce4

+ 4 - 1
src/content/blocksHandler/handlerTakeScreenshot.js

@@ -71,7 +71,10 @@ async function captureElement({ selector, tabId, options }) {
     throw error;
   }
 
-  element.scrollIntoView();
+  element.scrollIntoView({
+    block: 'center',
+    inline: 'center',
+  });
 
   await sleep(500);