Skip to content

Commit

Permalink
Instead of overflow hidden and 0 height/width, use clip.
Browse files Browse the repository at this point in the history
Should fix #28, but might regress #27
  • Loading branch information
sudodoki committed Jun 2, 2016
1 parent c6674c6 commit 7e10898
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ function copy(text, options) {

// prevents scrolling to the end of the page
mark.style.position = 'fixed';
mark.style.height = 0;
mark.style.width = 0;
mark.style.overflow = 'hidden';
mark.style.top = '0';
mark.style.clip = 'rect(0px 0px 0px 0px)';

document.body.appendChild(mark);

Expand Down

0 comments on commit 7e10898

Please sign in to comment.