fix(DatePicker): resolved page scrolling bug#9401
Conversation
|
Preview: https://patternfly-react-pr-9401.surge.sh A11y report: https://patternfly-react-pr-9401-a11y.surge.sh |
| checkCanFocusTrap: (containers) => new Promise((resolve) => { | ||
| const interval = setInterval(() => { | ||
| if (containers.every((container) => getComputedStyle(container).visibility !== 'hidden')) { | ||
| resolve(); | ||
| clearInterval(interval); | ||
| } | ||
| }, 10); | ||
| }), |
There was a problem hiding this comment.
An alternative to this is delaying when the focus trap is set to active via timeout, but that causes a delay between clicking the button to open the Popover and the element inside Popover receiving focus. Using this which is similar to something the focus-trap docs show in a demo prevents such a delay.
da6b67d to
a6c2956
Compare
a6c2956 to
9907582
Compare
df45076 to
14b48d2
Compare
nicolethoen
left a comment
There was a problem hiding this comment.
The only odd thing I'm noticing when interacting with the datepicker with keyboard, is that after I've selected a date and open the datepicker calendar again, it autofocuses on today rather than the day I had selected.
14b48d2 to
5884ec0
Compare
|
@nicolethoen ah good catch, it should now be getting the correct selector depending on whether a date has been selected or not. |
ee375be to
0c901a8
Compare
* chore(deps): bump docs framework (patternfly#9370) * chore(docs): Updated screenshots (patternfly#9337) * chore(docs): Updated screenshots * updated screenshots after logo update --------- Co-authored-by: Titani <[email protected]> * chore(release): releasing packages [ci skip] - @patternfly/[email protected] * chore(deps): bump to latest chore version (patternfly#9389) * chore(deps): bump to latest chore version * bump to 16 * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] * fix(fileupload): use default readonly text input instead of plain (patternfly#9387) * fix(fileupload): use default readonly text input instead of plain * chore(build): snaps * fix(CodeEditor): prevent clicks in textarea from opening fileupload (patternfly#9385) * fix(toolbar): added chip container class to toolbar content (patternfly#9379) * feat(Menu): added support for tooltips to menu (patternfly#9382) * fix(whitespace): Update readme to trigger release * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] * fix(Toolbar): resolved typeerror on full page demo (patternfly#9355) * chore(TreeView): converted examples to TS (patternfly#9286) * fix(ExpandableSection): added ARIA attributes (patternfly#9303) * fix(ExpandableSection): added ARIA attributes * Updated failing snapshots due to mismatching generated ID * chore(Tooltip): updated unit tests (patternfly#9295) * chore(Tooltip): updated unit tests * Updated mock and tests * Updated based on Austin feedback * Updated integration tests * Removed unused imports * Updated remaining tests using Popper mock * Removed extraenous snapshot test * Removed test * Split out onTooltipHidden test * chore(Card): added tests for new clickable/selectable (patternfly#9262) * chore(Card): added tests for new clickable/selectable * Added tests for clickable cards * Updated card with actions test * fix(Slider): reverted taborder (patternfly#9293) * fix(chore): Fix deprecated wizard integration tests (patternfly#9312) * fix(chore): Fix deprecated wizard integration tests * updated non deprecated test as well --------- Co-authored-by: Titani <[email protected]> --------- Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]> Co-authored-by: Eric Olkowski <[email protected]>
0c901a8 to
f9f2cc9
Compare
* Rebase postv5 (patternfly#9393) * chore(deps): bump docs framework (patternfly#9370) * chore(docs): Updated screenshots (patternfly#9337) * chore(docs): Updated screenshots * updated screenshots after logo update --------- Co-authored-by: Titani <[email protected]> * chore(release): releasing packages [ci skip] - @patternfly/[email protected] * chore(deps): bump to latest chore version (patternfly#9389) * chore(deps): bump to latest chore version * bump to 16 * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] * fix(fileupload): use default readonly text input instead of plain (patternfly#9387) * fix(fileupload): use default readonly text input instead of plain * chore(build): snaps * fix(CodeEditor): prevent clicks in textarea from opening fileupload (patternfly#9385) * fix(toolbar): added chip container class to toolbar content (patternfly#9379) * feat(Menu): added support for tooltips to menu (patternfly#9382) * fix(whitespace): Update readme to trigger release * chore(release): releasing packages [ci skip] - @patternfly/[email protected] - @patternfly/[email protected] - @patternfly/[email protected] - [email protected] - @patternfly/[email protected] * fix(Toolbar): resolved typeerror on full page demo (patternfly#9355) * chore(TreeView): converted examples to TS (patternfly#9286) * fix(ExpandableSection): added ARIA attributes (patternfly#9303) * fix(ExpandableSection): added ARIA attributes * Updated failing snapshots due to mismatching generated ID * chore(Tooltip): updated unit tests (patternfly#9295) * chore(Tooltip): updated unit tests * Updated mock and tests * Updated based on Austin feedback * Updated integration tests * Removed unused imports * Updated remaining tests using Popper mock * Removed extraenous snapshot test * Removed test * Split out onTooltipHidden test * chore(Card): added tests for new clickable/selectable (patternfly#9262) * chore(Card): added tests for new clickable/selectable * Added tests for clickable cards * Updated card with actions test * fix(Slider): reverted taborder (patternfly#9293) * fix(chore): Fix deprecated wizard integration tests (patternfly#9312) * fix(chore): Fix deprecated wizard integration tests * updated non deprecated test as well --------- Co-authored-by: Titani <[email protected]> --------- Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]> Co-authored-by: Eric Olkowski <[email protected]> * fix(DatePicker): resolved page scrolling bug * Updated snapshots after rebase * Fixed wrong date being focused after selection * Fixed linting errors --------- Co-authored-by: Titani Labaj <[email protected]> Co-authored-by: Titani <[email protected]> Co-authored-by: patternfly-build <[email protected]> Co-authored-by: Michael Coker <[email protected]> Co-authored-by: Dallas <[email protected]> Co-authored-by: Dana Gutride <[email protected]>
What: Closes #9205
Had a couple alternative approaches, but this seemed a little more flexible and utilized some of FocusTrap's built in functionality rather than trying to get CalendarMonth to handle focus correctly.
I originally tested these updates based off of #9339 and things looked good with the changes made there.
Additional issues: