mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
9254ff721d
commit
3197c48232
162 changed files with 902 additions and 9728 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-input",
|
||||
"version": "1.1.14",
|
||||
"version": "1.1.15",
|
||||
"description": "Material design text fields",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -48,11 +48,11 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.1.14",
|
||||
"_release": "1.1.15",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.14",
|
||||
"commit": "6f43713e93e1f3f21593b7f231f53bc19289fc42"
|
||||
"tag": "v1.1.15",
|
||||
"commit": "cb868e5f6468f2d6b98be9ee7d30d6fcb9bf9698"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-input.git",
|
||||
"_target": "^1.1.11",
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
language: node_js
|
||||
sudo: required
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: TcDqx+YdNCa/DRQjdKt9dgYCPgXtPl2EZ7Nnv6bRvbcmUjW2eSr7Zwb+e0fO8wgwms/RqFaVx+u5jo7D1lnC4Ybcg1HKiMOvCyzY36MjF9oB/VKSEUC+p4tMVQfw1IZ/RmK3dD+WEWaoT/EKmNfctz7v5kR+yk2lZo44D9I7rrc=
|
||||
- secure: nh65tvhnhOrK05qKvDJKMV7Jm9yiCoG1wFkP3ZnqOHix9Ny+KmcTa41Bl6NXQdvYaMTFtzS7lMZX5cqIziyKyGWHVN30LzGMHJNz12fhcMi3nJ84trhQGcu/9qR9yDv16q9ouGlcz1VxnDOHaRAHnIKjLIbhN3aJtMtZBbnWihA=
|
||||
- secure: Hg2KIEhKqOw0J8ZW2C3Pdgp5N4HD/f9jhdluH0tiYRCU4I/jf5grQuA3ohqsbqnJKV5l06gWVIDCdxBDwDEH0h8v9uUG5z/i2diiuLQc94SLQu8kWKkUPDOx+pUyXmfRKj6KnaRTotTLFrwlyuKDi9OfGjQbLZWTvmJUWoFwh4g=
|
||||
- secure: U6/Hp/V0ezT/yxeP2bv4S99LSLScKEaOfYwQUbe0+v5dPbN5XZaCUS6iSbNP2K8Mtb1UQUEyL8uN6Zn+khFlJ8/KJshppJ6HJi235CykahBhh9/Cv7EapgDUoss14ntE8EKpm6Ijo4LvVyPVmhgqKk9wP5ykDFtvhoKD4C3guVU=
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: '46.0'
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- google-chrome-stable
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||
- xvfb-run wct
|
||||
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s 'default'; fi
|
||||
dist: trusty
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-input",
|
||||
"version": "1.1.14",
|
||||
"version": "1.1.15",
|
||||
"description": "Material design text fields",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -212,7 +212,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
* element, bind this to the `<input is="iron-input">`'s `autofocus` property.
|
||||
*/
|
||||
autofocus: {
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
observer: '_autofocusChanged'
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -529,6 +530,33 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
cancelable: event.cancelable
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_autofocusChanged: function() {
|
||||
// Firefox doesn't respect the autofocus attribute if it's applied after
|
||||
// the page is loaded (Chrome/WebKit do respect it), preventing an
|
||||
// autofocus attribute specified in markup from taking effect when the
|
||||
// element is upgraded. As a workaround, if the autofocus property is set,
|
||||
// and the focus hasn't already been moved elsewhere, we take focus.
|
||||
if (this.autofocus && this._focusableElement) {
|
||||
|
||||
// In IE 11, the default document.activeElement can be the page's
|
||||
// outermost html element, but there are also cases (under the
|
||||
// polyfill?) in which the activeElement is not a real HTMLElement, but
|
||||
// just a plain object. We identify the latter case as having no valid
|
||||
// activeElement.
|
||||
var activeElement = document.activeElement;
|
||||
var isActiveElementValid = activeElement instanceof HTMLElement;
|
||||
|
||||
// Has some other element has already taken the focus?
|
||||
var isSomeElementActive = isActiveElementValid &&
|
||||
activeElement !== document.body &&
|
||||
activeElement !== document.documentElement; /* IE 11 */
|
||||
if (!isSomeElementActive) {
|
||||
// No specific element has taken the focus yet, so we can take it.
|
||||
this._focusableElement.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ style this element.
|
|||
|
||||
<content select="[prefix]"></content>
|
||||
|
||||
<label hidden$="[[!label]]" aria-hidden="true">[[label]]</label>
|
||||
<label hidden$="[[!label]]" aria-hidden="true" for="input">[[label]]</label>
|
||||
|
||||
<input is="iron-input" id="input"
|
||||
aria-labelledby$="[[_ariaLabelledBy]]"
|
||||
|
@ -139,7 +139,7 @@ style this element.
|
|||
<content select="[suffix]"></content>
|
||||
|
||||
<template is="dom-if" if="[[errorMessage]]">
|
||||
<paper-input-error>[[errorMessage]]</paper-input-error>
|
||||
<paper-input-error aria-live="assertive">[[errorMessage]]</paper-input-error>
|
||||
</template>
|
||||
|
||||
<template is="dom-if" if="[[charCounter]]">
|
||||
|
|
|
@ -211,6 +211,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.equal(ironInput.selectionEnd, 2, 'selectionEnd is preserved');
|
||||
});
|
||||
|
||||
test('setting autofocus to true implictly acquires focus', function(done) {
|
||||
var input = fixture('basic');
|
||||
var inputFocusSpy = sinon.spy(input.inputElement, 'focus');
|
||||
window.setTimeout(function() {
|
||||
assert(inputFocusSpy.called);
|
||||
done();
|
||||
}, 50);
|
||||
input.autofocus = true;
|
||||
});
|
||||
|
||||
test('autofocus doesn\'t grab focus if another element already has it', function(done) {
|
||||
var inputs = fixture('multiple-inputs');
|
||||
var inputFocusSpies = inputs.map(function(input) {
|
||||
return sinon.spy(input.inputElement, 'focus');
|
||||
});
|
||||
window.setTimeout(function() {
|
||||
assert(inputFocusSpies[0].called, 'first autofocus input with grabbed focus');
|
||||
assert(!inputFocusSpies[1].called, 'second autofocus input let first input keep focus');
|
||||
done();
|
||||
}, 50);
|
||||
inputs[0].autofocus = true;
|
||||
inputs[1].autofocus = true; // Shouldn't cause focus to change
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('focus/blur events', function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue