Skip to content

Commit 5f19b0f

Browse files
committed
i18n: fix tooltip alignment after last change #492
1 parent 27bb276 commit 5f19b0f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

static/js/theme.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,13 @@ function initCodeClipboard(){
368368

369369
clip.on( 'success', function( e ){
370370
e.clearSelection();
371+
var inPre = e.trigger.parentNode.tagName.toLowerCase() == 'pre';
371372
e.trigger.setAttribute( 'aria-label', window.T_Copied_to_clipboard );
372373
e.trigger.classList.add( 'tooltipped', 'tooltipped-' + (inPre ? 'w' : 's'+(isRtl?'e':'w')) );
373374
});
374375

375376
clip.on( 'error', function( e ){
377+
var inPre = e.trigger.parentNode.tagName.toLowerCase() == 'pre';
376378
e.trigger.setAttribute( 'aria-label', fallbackMessage(e.action) );
377379
e.trigger.classList.add( 'tooltipped', 'tooltipped-' + (inPre ? 'w' : 's'+(isRtl?'e':'w')) );
378380
var f = function(){

0 commit comments

Comments
 (0)