Skip to content

Commit

Permalink
don't let the cp2clip div cover a nearby edit button
Browse files Browse the repository at this point in the history
fix #8
  • Loading branch information
schplurtz committed May 16, 2022
1 parent be3c89d commit ed294bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ jQuery(function() {
container.style['margin-top'] = marginTop;
elem.style['margin-top']=0;
}
// Do the same for margin-bottom.
let marginBottom=window.getComputedStyle(elem)['margin-bottom'];
if( marginBottom != "0px" ) {
container.style['margin-bottom'] = marginBottom;
elem.style['margin-bottom']=0;
}
container.appendChild(cpbutton);
cpbutton.addEventListener('click', response);
})
Expand Down

0 comments on commit ed294bd

Please sign in to comment.