@@ -31,7 +31,6 @@ const {isUrl, isIntermediateAboutPage} = require('../lib/appUrlUtil')
31
31
class UrlBar extends ImmutableComponent {
32
32
constructor ( ) {
33
33
super ( )
34
- this . onActiveFrameStop = this . onActiveFrameStop . bind ( this )
35
34
this . onFocus = this . onFocus . bind ( this )
36
35
this . onBlur = this . onBlur . bind ( this )
37
36
this . onKeyDown = this . onKeyDown . bind ( this )
@@ -213,7 +212,7 @@ class UrlBar extends ImmutableComponent {
213
212
break
214
213
case KeyCodes . ESC :
215
214
e . preventDefault ( )
216
- ipc . emit ( messages . SHORTCUT_ACTIVE_FRAME_STOP )
215
+ this . props . onStop ( )
217
216
this . clearSearchEngine ( )
218
217
this . restore ( )
219
218
this . select ( )
@@ -373,28 +372,12 @@ class UrlBar extends ImmutableComponent {
373
372
this . detectSearchEngine ( )
374
373
}
375
374
376
- onActiveFrameStop ( ) {
377
- if ( this . isFocused ( ) ) {
378
- windowActions . setUrlBarActive ( false )
379
- if ( ! this . shouldRenderUrlBarSuggestions ||
380
- // TODO: Once we take out suggestion generation from within URLBarSuggestions we can remove this check
381
- // and put it in shouldRenderUrlBarSuggestions where it belongs. See https://github.com/brave/browser-laptop/issues/3151
382
- ! this . props . urlbar . getIn ( [ 'suggestions' , 'suggestionList' ] ) ||
383
- this . props . urlbar . getIn ( [ 'suggestions' , 'suggestionList' ] ) . size === 0 ) {
384
- this . restore ( )
385
- windowActions . setUrlBarSelected ( true )
386
- }
387
- }
388
- }
389
-
390
375
componentWillMount ( ) {
391
376
ipc . on ( messages . SHORTCUT_FOCUS_URL , ( e ) => {
392
377
windowActions . setRenderUrlBarSuggestions ( false )
393
378
windowActions . setUrlBarSelected ( true )
394
379
windowActions . setUrlBarActive ( true )
395
380
} )
396
- // escape key handling
397
- ipc . on ( messages . SHORTCUT_ACTIVE_FRAME_STOP , this . onActiveFrameStop )
398
381
}
399
382
400
383
componentDidMount ( ) {
0 commit comments