Skip to content

Commit

Permalink
proper IE 11 compatibility - fixes #366
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Jul 30, 2015
1 parent 4ee7e94 commit 51a854e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions client/lib/customEventPolyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function () {
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}

CustomEvent.prototype = window.Event.prototype;

window.CustomEvent = CustomEvent;
})();
4 changes: 2 additions & 2 deletions client/routes/roomRoute.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FlowRouter.route '/room/:_id',

mainNode = document.querySelector('.main-content')
if mainNode?
child?.remove() for child in mainNode.children
mainNode.removeChild child for child in mainNode.children
room = RoomManager.getDomOfRoom(params._id)
mainNode.appendChild room
if room.classList.contains('room-container')
Expand All @@ -42,5 +42,5 @@ FlowRouter.route '/room/:_id',
if child?
if child.classList.contains('room-container')
child.oldScrollTop = child.querySelector('.messages-box > .wrapper').scrollTop
child.remove()
$(child).remove()
]
2 changes: 2 additions & 0 deletions client/stylesheets/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,7 @@ a.github-fork {
text-align: right;
background: #fff;
min-height: @footer-min-height;
height: @footer-min-height;
background-color: @primary-background-color;
.logo {
display: block;
Expand All @@ -1364,6 +1365,7 @@ a.github-fork {
img {
display: inline-block;
max-width: 222px;
max-height: 43px;
margin-bottom: -10px;
}
}
Expand Down
4 changes: 2 additions & 2 deletions client/views/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
<div class="connection-status">
{{> status}}
</div>
<main class="main-content {{flexOpened}} {{flexOpenedRTC1}} {{flexOpenedRTC2}}">
<div class="main-content {{flexOpened}} {{flexOpenedRTC1}} {{flexOpenedRTC2}}">
{{> Template.dynamic template=center}}
</main>
</div>
{{> sideNav }}
</div>
{{> audioNotification }}
Expand Down

0 comments on commit 51a854e

Please sign in to comment.