mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
8119b930e4
commit
cbb6337b41
74 changed files with 2195 additions and 1393 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-autogrow-textarea",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "A textarea element that automatically grows with input",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -37,11 +37,11 @@
|
|||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.6",
|
||||
"_release": "1.0.7",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.6",
|
||||
"commit": "e0465d41019cf03827f4820a254ce80e56266e99"
|
||||
"tag": "v1.0.7",
|
||||
"commit": "f31131a9c45af7845780f94ec7e69816929ac6cc"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-autogrow-textarea.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-autogrow-textarea",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "A textarea element that automatically grows with input",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -26,6 +26,12 @@ Example:
|
|||
Because the `textarea`'s `value` property is not observable, you should use
|
||||
this element's `bind-value` instead for imperative updates.
|
||||
|
||||
### Styling
|
||||
The following custom properties and mixins are available for styling:
|
||||
Custom property | Description | Default
|
||||
----------------|-------------|----------
|
||||
`--iron-autogrow-textarea` | Mixin applied to the textarea | `{}`
|
||||
|
||||
@group Iron Elements
|
||||
@hero hero.svg
|
||||
@demo demo/index.html
|
||||
|
@ -62,6 +68,7 @@ this element's `bind-value` instead for imperative updates.
|
|||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
line-height: inherit;
|
||||
@apply(--iron-autogrow-textarea);
|
||||
}
|
||||
|
||||
::content textarea:invalid {
|
||||
|
@ -82,6 +89,7 @@ this element's `bind-value` instead for imperative updates.
|
|||
placeholder$="[[placeholder]]"
|
||||
readonly$="[[readonly]]"
|
||||
required$="[[required]]"
|
||||
disabled$="[[disabled]]"
|
||||
rows$="[[rows]]"
|
||||
maxlength$="[[maxlength]]"></textarea>
|
||||
</div>
|
||||
|
@ -278,7 +286,14 @@ this element's `bind-value` instead for imperative updates.
|
|||
return;
|
||||
}
|
||||
|
||||
textarea.value = this.bindValue;
|
||||
// If the bindValue changed manually, then we need to also update
|
||||
// the underlying textarea's value. Otherwise this change was probably
|
||||
// generated from the _onInput handler, and the two values are already
|
||||
// the same.
|
||||
if (textarea.value !== this.bindValue) {
|
||||
textarea.value = !(this.bindValue || this.bindValue === 0) ? '' : this.bindValue;
|
||||
}
|
||||
|
||||
this.$.mirror.innerHTML = this._valueForMirror();
|
||||
// manually notify because we don't want to notify until after setting value
|
||||
this.fire('bind-value-changed', {value: this.bindValue});
|
||||
|
|
|
@ -88,6 +88,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.isTrue(finalHeight < initialHeight);
|
||||
});
|
||||
|
||||
test('an undefined bindValue is the empty string', function() {
|
||||
var autogrow = fixture('basic');
|
||||
var initialHeight = autogrow.offsetHeight;
|
||||
|
||||
autogrow.bindValue = 'batman\nand\nrobin';
|
||||
var finalHeight = autogrow.offsetHeight;
|
||||
assert.isTrue(finalHeight > initialHeight);
|
||||
|
||||
autogrow.bindValue = undefined;
|
||||
assert.equal(autogrow.offsetHeight, initialHeight);
|
||||
assert.equal(autogrow.textarea.value, '');
|
||||
});
|
||||
|
||||
test('textarea selection works', function() {
|
||||
var autogrow = fixture('basic');
|
||||
var textarea = autogrow.textarea;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue