Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Popup): Do not propagate keydown events outside Popup's content #987

Merged
merged 7 commits into from
Mar 1, 2019

Conversation

sophieH29
Copy link
Contributor

@sophieH29 sophieH29 commented Feb 27, 2019

Closes #978

No need to propagate keydown events outside Popup, allow only keyboard actions to execute

@sophieH29 sophieH29 added the 🧰 fix Introduces fix for broken behavior. label Feb 27, 2019
@sophieH29 sophieH29 self-assigned this Feb 27, 2019
@codecov
Copy link

codecov bot commented Feb 27, 2019

Codecov Report

Merging #987 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #987      +/-   ##
=========================================
+ Coverage   81.08%   81.1%   +0.01%     
=========================================
  Files         671     671              
  Lines        8625    8627       +2     
  Branches     1456    1520      +64     
=========================================
+ Hits         6994    6997       +3     
+ Misses       1616    1615       -1     
  Partials       15      15
Impacted Files Coverage Δ
packages/react/src/components/Popup/Popup.tsx 72.68% <100%> (+0.8%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fdfa2f...8d66427. Read the comment docs.

Copy link
Collaborator

@bmdalex bmdalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

packages/react/src/components/Popup/Popup.tsx Show resolved Hide resolved
@layershifter layershifter added needs author changes Author needs to implement changes before merge and removed 🚀 ready for review labels Feb 28, 2019
@sophieH29 sophieH29 added 🚀 ready for review and removed needs author changes Author needs to implement changes before merge labels Mar 1, 2019
@sophieH29 sophieH29 merged commit c15167a into master Mar 1, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/popup-do-not-propagate-keydown-events branch March 1, 2019 09:07
@@ -439,8 +438,12 @@ export default class Popup extends AutoControlledComponent<ReactProps<PopupProps
const popupWrapperAttributes = {
...(rtl && { dir: 'rtl' }),
...accessibility.attributes.popup,
...accessibility.keyHandlers.popup,

onKeyDown: (e: React.KeyboardEvent) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is too late now, but I was just wondering whether our suggestion for the users would have been override the onKeyDown for the Popup and stop propagating if you want? This seem too much specific to the client's needs that we had at that moment.. @layershifter @sophieH29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧰 fix Introduces fix for broken behavior. 🚀 ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants