Merge pull request #56 from google/global-querySelector

Don't rely on global querySelector() for MaterialTabs
master
Addy Osmani 2015-03-18 13:15:07 +00:00
commit 39b2fecc94
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ function MaterialTab(tab, ctx) {
tab.addEventListener('click', function(e) {
e.preventDefault();
var href = tab.href.split('#')[1];
var panel = document.querySelector('#' + href);
var panel = ctx.element_.querySelector('#' + href);
ctx.resetTabState_();
ctx.resetPanelState_();
tab.classList.add(ctx.CssClasses_.ACTIVE_CLASS);