mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-08 18:06:36 +00:00
Remove Safari toggle hack (#447)
This commit is contained in:
parent
3c30e65756
commit
121c0d0879
@ -75,14 +75,6 @@ Polymer({
|
||||
toggleChanged: function (ev) {
|
||||
var newVal = ev.target.checked;
|
||||
|
||||
// HACK: https://github.com/PolymerElements/paper-toggle-button/issues/124
|
||||
setTimeout(function () {
|
||||
const el = document.activeElement;
|
||||
el.blur();
|
||||
el.focus();
|
||||
}, 0);
|
||||
// END HACK
|
||||
|
||||
if (newVal && !this.isOn) {
|
||||
this.callService(true);
|
||||
} else if (!newVal && this.isOn) {
|
||||
@ -92,15 +84,6 @@ Polymer({
|
||||
|
||||
isOnChanged: function (newVal) {
|
||||
this.toggleChecked = newVal;
|
||||
|
||||
// HACK: https://github.com/PolymerElements/paper-toggle-button/issues/124
|
||||
var el = this.shadowRoot.querySelector('paper-toggle-button');
|
||||
|
||||
if (el) {
|
||||
el.focus();
|
||||
el.blur();
|
||||
}
|
||||
// END HACK
|
||||
},
|
||||
|
||||
forceStateChange: function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user