-
Notifications
You must be signed in to change notification settings - Fork 975
Fix autofill regression caused by refactor #4669
Fix autofill regression caused by refactor #4669
Conversation
@@ -20,7 +20,6 @@ const {tabFromFrame} = require('../state/frameStateUtil') | |||
const {l10nErrorText} = require('../../app/common/lib/httpUtil') | |||
const {aboutUrls, getSourceAboutUrl, isIntermediateAboutPage, navigatableTypes} = require('../lib/appUrlUtil') | |||
const Serializer = require('../dispatcher/serializer') | |||
const { showBookmarkFolderInit } = require('../contextMenus') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the line which broke things (definitely my bad)
@@ -841,7 +813,7 @@ const doAction = (action) => { | |||
if (getSetting(settings.AUTO_HIDE_MENU)) { | |||
doAction({actionType: WindowConstants.WINDOW_TOGGLE_MENUBAR_VISIBLE, isVisible: false}) | |||
} else { | |||
hideContextMenu(action) | |||
doAction({actionType: WindowConstants.WINDOW_SET_CONTEXT_MENU_DETAIL}) | |||
} | |||
doAction({actionType: WindowConstants.WINDOW_SET_SUBMENU_SELECTED_INDEX}) | |||
doAction({actionType: WindowConstants.WINDOW_SET_BOOKMARKS_TOOLBAR_SELECTED_FOLDER_ID}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad this came up- this is something I missed while doing the refactor. Resetting the menu status is supposed to clear the selected folder ID. This action never got renamed to the new one
This PR no longer needed- it was included as one of the commits in #4658 (I was still working on that one and was going to drop it via rebase) |
agree on the contextMenus -> windowStore dependency. Any state it requires should be passed in like any other component |
Some of the refactoring done in #4361 unfortunately broke autofill. This commit reverts the parts that broke it back to the pre-refactor state and keeps the parts that were OK.
Properly fixes #1725
js/store/windowStore.js
andjs/contextMenus.js
had a circular dependency with each other. Ultimately,contextMenus.js
shouldn't have a dependency on windowStore (IMO). I tried to keep the refactored code in place and while eliminating the windowStore dependency incontextMenus.js
and realized this is not an easy task (we'll have to revisit in future)Auditors: @darkdh @bridiver
Test Plan: follow steps from original PR. The original automated tests work great