Skip to content

Commit

Permalink
Strengthen the download toolbar visible condition just like main.js
Browse files Browse the repository at this point in the history
fix brave#3758
fix brave#7033

Auditors: @bbondy

Test Plan:

1. Toggle clear download history when close Brave
2. Download something to make download tool bar shows
3. Quit Brave when downloading
4. After relaunch brave go to https://github.com/brave/browser-laptop/issues
5. Search something on filter to make autofill popup
6. The popup shouldn't be shifted
  • Loading branch information
darkdh committed Feb 5, 2017
1 parent c320129 commit 5477e8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/contextMenus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,8 @@ function onShowUsernameMenu (usernames, origin, action, boundingRect,

function onShowAutofillMenu (suggestions, boundingRect, frame) {
const menuTemplate = autofillTemplateInit(suggestions, frame)
const downloadsBarOffset = windowStore.getState().getIn(['ui', 'downloadsToolbar', 'isVisible']) ? getDownloadsBarHeight() : 0
const downloadsBarOffset = windowStore.getState().getIn(['ui', 'downloadsToolbar', 'isVisible']) &&
appStore.state.get('downloads') && appStore.state.get('downloads').size ? getDownloadsBarHeight() : 0
const offset = {
x: (window.innerWidth - boundingRect.clientWidth),
y: (window.innerHeight - boundingRect.clientHeight)
Expand Down

0 comments on commit 5477e8a

Please sign in to comment.