don't show tips if view is hidden

This commit is contained in:
Antelle 2016-02-28 20:21:13 +03:00
parent e432fd9748
commit 978e2de942
1 changed files with 9 additions and 4 deletions

View File

@ -385,12 +385,17 @@ var DetailsView = Backbone.View.extend({
var clipboardTime = e.copyRes.seconds;
var msg = clipboardTime ? Locale.detFieldCopiedTime.replace('{}', clipboardTime)
: Locale.detFieldCopied;
var tip = new Tip(fieldLabel, { title: msg, placement: 'right', fast: true });
this.fieldCopyTip = tip;
tip.show();
var tip;
if (!this.isHidden()) {
tip = new Tip(fieldLabel, {title: msg, placement: 'right', fast: true});
this.fieldCopyTip = tip;
tip.show();
}
var that = this;
setTimeout(function() {
tip.hide();
if (tip) {
tip.hide();
}
that.fieldCopyTip = null;
if (e.source.model.name === '$Password' && AppSettingsModel.instance.get('lockOnCopy')) {
setTimeout(function() {