Skip to content

Commit

Permalink
Fix bug 1453231: [FTL] Disable copy shortcut for complex strings (#947)
Browse files Browse the repository at this point in the history
When copy button is disabled (hidden), keyboard shortcut should be
disabled as well.
  • Loading branch information
mathjazz committed May 4, 2018
1 parent 429aeeb commit 1cfb649
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pontoon/base/static/js/translate.js
Expand Up @@ -1951,6 +1951,10 @@ var Pontoon = (function (my) {
$('#copy').click(function (e) {
e.preventDefault();

if (!$(this).is(':visible')) {
return;
}

var entity = self.getEditorEntity(),
original = entity['original' + self.isPluralized()],
source = self.fluent.getSourceStringValue(entity, original);
Expand Down

0 comments on commit 1cfb649

Please sign in to comment.