This repository was archived by the owner on Dec 11, 2019. It is now read-only.
Commit 1154bb3 1 parent 6ec02d8 commit 1154bb3 Copy full SHA for 1154bb3
File tree 1 file changed +9
-8
lines changed
app/renderer/components/tabs
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -172,16 +172,17 @@ class Tab extends ImmutableComponent {
172
172
}
173
173
174
174
onMouseEnter ( e ) {
175
- // relatedTarget inside mouseenter checks which element before this event was the pointer on
176
- // if this element has a tab-like class, then it's likely that the user was previewing
177
- // a sequency of tabs. Called here as previewMode.
178
- const previewMode = / t a b (? ! p a g e s ) / i. test ( e . relatedTarget . classList )
175
+ // Includes all classes that the mouse can came from
176
+ // if user is going from urlbar to webview or vice-versa
177
+ const fromVerticalAxis =
178
+ / ^ t a b (? = s t o o l b a r | p a g e s ) | ^ a l l o w d r a g g i n g | ^ s i n g l e p a g e | ^ b o o k m a r k s | ^ w e b v i e w / i
179
+ . test ( e . relatedTarget . classList )
179
180
180
- // If user isn't in previewMode, we add a bit of delay to avoid tab from flashing out
181
- // as reported here: https://github.com/brave/browser-laptop/issues/1434
182
181
if ( this . props . previewTabs ) {
183
- this . hoverTimeout =
184
- window . setTimeout ( windowActions . setPreviewFrame . bind ( null , this . props . frame . get ( 'key' ) ) , previewMode ? 0 : 200 )
182
+ this . hoverTimeout = window . setTimeout (
183
+ windowActions . setPreviewFrame . bind ( null , this . props . frame . get ( 'key' ) ) ,
184
+ fromVerticalAxis ? 350 : 0
185
+ )
185
186
}
186
187
windowActions . setTabHoverState ( this . props . frame . get ( 'key' ) , true )
187
188
}
You can’t perform that action at this time.
0 commit comments