Skip to content

Commit

Permalink
Merge pull request #685 from gharlan/patch-1
Browse files Browse the repository at this point in the history
Fix styles of copy button after hover
  • Loading branch information
denis-sokolov committed Jan 24, 2021
2 parents 2b030e4 + a32b501 commit 09781b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Whoops/Resources/js/whoops.base.js
Expand Up @@ -100,7 +100,7 @@ Zepto(function($) {

var clipboard = new Clipboard('.clipboard');
var showTooltip = function(elem, msg) {
elem.setAttribute('class', 'clipboard tooltipped tooltipped-s');
elem.classList.add('tooltipped', 'tooltipped-s');
elem.setAttribute('aria-label', msg);
};

Expand All @@ -117,7 +117,7 @@ Zepto(function($) {
var btn = document.querySelector('.clipboard');

btn.addEventListener('mouseleave', function(e) {
e.currentTarget.setAttribute('class', 'rightButton clipboard');
e.currentTarget.classList.remove('tooltipped', 'tooltipped-s');
e.currentTarget.removeAttribute('aria-label');
});

Expand Down

0 comments on commit 09781b5

Please sign in to comment.