Skip to content

Commit

Permalink
Menu: Fixed JS error in IE8 when clicking menu panel button a second …
Browse files Browse the repository at this point in the history
…time before the menu panel opens
  • Loading branch information
Paul Jackson authored and Paul Jackson committed Jan 10, 2014
1 parent eba2c5e commit 147dee0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
35 changes: 33 additions & 2 deletions src/plugins/overlay/overlay-ie8.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,38 @@
* Overlay base
*/
.ie8 {
.wb-overlay {
border: 1px solid #ccc;
%overlay-ie8-border-left-999 {
border-left: 1px solid #999;
}

%overlay-ie8-border-right-999 {
border-left: 1px solid #999;
}

.wb-panel-l {
@extend %overlay-ie8-border-right-999;
}

.wb-panel-r {
@extend %overlay-ie8-border-left-999;
}

.wb-bar-t {
border-bottom: 1px solid #999;
}

.wb-bar-b {
border-top: 1px solid #999;
}
&[dir=rtl] {
.wb-panel-l {
border-right: none;
@extend %overlay-ie8-border-left-999;
}

.wb-panel-r {
border-left: none;
@extend %overlay-ie8-border-right-999;
}
}
}
2 changes: 1 addition & 1 deletion src/plugins/overlay/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ $document.on( "click vclick touchstart focusin", "body", function( event ) {
// Close any overlays with outside activity
for ( overlayId in sourceLinks ) {
overlay = document.getElementById( overlayId );
if ( overlay.getAttribute( "aria-hidden" ) === "false" &&
if ( overlay !== null && overlay.getAttribute( "aria-hidden" ) === "false" &&
eventTarget.id !== overlayId &&
overlay.className.indexOf( ignoreOutsideClass ) === -1 &&
!$.contains( overlay, eventTarget ) ) {
Expand Down

0 comments on commit 147dee0

Please sign in to comment.