fix #89: disallow protected fields value selection

This commit is contained in:
antelle 2016-04-03 12:48:37 +03:00
parent 3599c72db4
commit 5eec337e75
4 changed files with 6 additions and 1 deletions

View File

@ -15,7 +15,7 @@ var FieldView = Backbone.View.extend({
render: function () {
this.value = typeof this.model.value === 'function' ? this.model.value() : this.model.value;
this.renderTemplate({ editable: !this.readonly, multiline: this.model.multiline, title: this.model.title,
canEditTitle: this.model.newField });
canEditTitle: this.model.newField, protect: this.value && this.value.isProtected });
this.valueEl = this.$el.find('.details__field-value');
this.valueEl.html(this.renderValue(this.value));
this.labelEl = this.$el.find('.details__field-label');

View File

@ -213,6 +213,9 @@
}
}
}
.details__field--protect & {
@include user-select(none);
}
.details__field--multiline & {
width: 0;
word-break: break-all;

View File

@ -2,6 +2,7 @@
{{~#if editable}} details__field--editable{{/if~}}
{{~#if multiline}} details__field--multiline{{/if~}}
{{~#if canEditTitle}} details__field--can-edit-title{{/if~}}
{{~#if protect}} details__field--protect{{/if~}}
">
<div class="details__field-label">{{title}}</div>
<div class="details__field-value">

View File

@ -31,6 +31,7 @@ Storage providers, one-time passwords, usability improvements
`-` fix capslock indicator
`-` fix file settings input behavior
`-` fix favicon download
`-` fix protected fields copy-paste
##### v1.0.4 (2016-02-25)
Workaround for Chrome bug