@@ -30,9 +30,9 @@ import TopAppBarIcon from './Icon';
30
30
import { cssClasses } from './constants' ;
31
31
import { MDCFixedTopAppBarFoundation } from '@material/top-app-bar/fixed/foundation' ;
32
32
import { MDCTopAppBarAdapter } from '@material/top-app-bar/adapter' ;
33
- import MDCTopAppBarFoundation from '@material/top-app-bar/foundation' ;
33
+ import { MDCTopAppBarFoundation } from '@material/top-app-bar/standard /foundation' ;
34
34
import { MDCShortTopAppBarFoundation } from '@material/top-app-bar/short/foundation' ;
35
- import { EventType , SpecificEventListener } from '@material/base/types' ;
35
+ import { SpecificEventListener } from '@material/base/types' ;
36
36
37
37
export type MDCTopAppBarFoundationTypes
38
38
= MDCFixedTopAppBarFoundation | MDCTopAppBarFoundation | MDCShortTopAppBarFoundation ;
@@ -225,22 +225,10 @@ class TopAppBar<T extends HTMLElement = HTMLHeadingElement> extends React.Compon
225
225
deregisterResizeHandler : ( handler : SpecificEventListener < 'resize' > ) => {
226
226
window . removeEventListener ( 'resize' , handler ) ;
227
227
} ,
228
- registerNavigationIconInteractionHandler : < K extends EventType > ( type : K , handler : SpecificEventListener < K > ) => {
229
- if ( this . topAppBarElement && this . topAppBarElement . current ) {
230
- const navIcon = this . topAppBarElement . current . querySelector ( `.${ cssClasses . NAV_ICON } ` ) ;
231
- if ( navIcon ) {
232
- navIcon . addEventListener ( type , handler ) ;
233
- }
234
- }
235
- } ,
236
- deregisterNavigationIconInteractionHandler : < K extends EventType > ( type : K , handler : SpecificEventListener < K > ) => {
237
- if ( this . topAppBarElement && this . topAppBarElement . current ) {
238
- const navIcon = this . topAppBarElement . current . querySelector ( `.${ cssClasses . NAV_ICON } ` ) ;
239
- if ( navIcon ) {
240
- navIcon . removeEventListener ( type , handler ) ;
241
- }
242
- }
243
- } ,
228
+ // onClick handler of navigation bar is used instead
229
+ // see https://github.com/material-components/material-components-web/issues/2813
230
+ registerNavigationIconInteractionHandler : ( ) => null ,
231
+ deregisterNavigationIconInteractionHandler : ( ) => null ,
244
232
notifyNavigationIconClicked : ( ) => {
245
233
if ( this . props . onNavIconClicked ) {
246
234
this . props . onNavIconClicked ( ) ;
0 commit comments