The selected menu keys are not updated when using functions like history.goBack() or using browers' default go back button. This is caused becuase the selected menu keys are only updated when a user click a menu item which calls onClickMenuItem inside which the selected keys get updated.
The Link element is redundant because inside onClickMenuItem the corresponding link was already pushed using history.push when a user clicks a menu item. If the Link element is not removed, it causes browser to push the link twice at one click, so a user needs to click go back twice to get to the original link.
Solution
How is the change tested?
Changelog
Changelog(CN)
Changelog(EN)
Related issues
Checklist:
[ ] Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
[ ] Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others should be submitted to master branch)
Types of changes
Background and context
The selected menu keys are not updated when using functions like
history.goBack()
or using browers' default go back button. This is caused becuase the selected menu keys are only updated when a user click a menu item which callsonClickMenuItem
inside which the selected keys get updated.The
Link
element is redundant because insideonClickMenuItem
the corresponding link was already pushed usinghistory.push
when a user clicks a menu item. If theLink
element is not removed, it causes browser to push the link twice at one click, so a user needs to click go back twice to get to the original link.Solution
How is the change tested?
Changelog
Checklist:
feature
branch and others should be submitted tomaster
branch)Other information