Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog focus handling #548

Merged
merged 3 commits into from
May 1, 2018
Merged

Dialog focus handling #548

merged 3 commits into from
May 1, 2018

Conversation

smhigley
Copy link
Contributor

Type: bug

The following has been addressed in the PR:

  • There is a related issue
  • All code matches the style guide
  • Unit or Functional tests are included in the PR

Description:

Resolves #537

Modal dialogs trap focus, non-modal dialogs close on blur

@dylans dylans added this to the 2.0.0 milestone Apr 30, 2018
@codecov
Copy link

codecov bot commented Apr 30, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #548      +/-   ##
==========================================
+ Coverage   97.31%   97.32%   +0.01%     
==========================================
  Files          32       32              
  Lines        2530     2546      +16     
  Branches      642      645       +3     
==========================================
+ Hits         2462     2478      +16     
  Misses          9        9              
  Partials       59       59
Impacted Files Coverage Δ
src/dialog/index.ts 98.83% <100%> (+0.2%) ⬆️
src/listbox/index.ts 95.65% <0%> (ø) ⬆️
src/calendar/index.ts 99.5% <0%> (ø) ⬆️
src/calendar/DatePicker.ts 99.28% <0%> (ø) ⬆️
src/split-pane/index.ts 92.92% <0%> (+0.07%) ⬆️

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 2088294...61cfb7f. Read the comment docs.

Copy link
Contributor

@mwistrand mwistrand left a comment

Choose a reason for hiding this comment

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

One very minor nit.

return;
}

let dialogFocus = this.meta(Focus).get('main');
Copy link
Contributor

Choose a reason for hiding this comment

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

let => const

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, and good catch! Before I split it out, it was checking dialogFocus twice, and I must've forgotten to change it afterwards. Fixed now!

@smhigley smhigley merged commit 541fee3 into dojo:master May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard workflow allows focus to escape Dialog
3 participants