Skip to content

Commit

Permalink
Fix IE11 Fullscreen button disappearance
Browse files Browse the repository at this point in the history
In IE11, the fullscreen button in the controls UI disappears after
clicking 'Load'. This is because the classList toggle method is not
fully supported for IE11, so the 'casting' class is added to the
controls div every time. Fixing by using add and remove instead of
toggle.

Closes #787.

Change-Id: I9c4f2cfdc32d1ed11e3a4b5b86e885bd8c10db3d
  • Loading branch information
michellezhuogg committed Jun 16, 2017
1 parent ca64053 commit 4b0953f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions build/conformance.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ requirement: {
}


#Disallow classList toggle.
requirement: {
type: BANNED_PROPERTY_CALL
value: 'DOMTokenList.prototype.toggle'
error_message: 'classList toggle is not supported in IE11'
}


# Disallow ES6 methods.
requirement: {
type: BANNED_PROPERTY
Expand Down
6 changes: 5 additions & 1 deletion demo/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,11 @@ ShakaControls.prototype.onCastStatusChange_ = function(event) {
isCasting ? 'inherit' : 'none';
this.castReceiverName_.textContent =
isCasting ? 'Casting to ' + this.castProxy_.receiverName() : '';
this.controls_.classList.toggle('casting', this.castProxy_.isCasting());
if (this.castProxy_.isCasting()) {
this.controls_.classList.add('casting');
} else {
this.controls_.classList.remove('casting');
}
};


Expand Down

0 comments on commit 4b0953f

Please sign in to comment.