Skip to content

Conversation

@behowell
Copy link
Contributor

Pull request checklist

Description of changes

SearchBox was always eating the Esc key, even if there was no text to clear from the search box. This prevented any parent components from handling the Esc key. For example, a dialog should dismiss when Esc is pressed on an empty search box in the dialog.

Fix: Don't handle the Esc key or call onClear if the search box is empty.

@behowell behowell requested a review from ecraig12345 November 20, 2020 02:52
@behowell behowell self-assigned this Nov 20, 2020
@msft-github-bot msft-github-bot added Fabric 7 needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master labels Nov 20, 2020
@behowell behowell removed the needs cherry-pick Temporary label for PRs which may need to be cherry-picked to master label Nov 20, 2020
@behowell
Copy link
Contributor Author

Note: I also have PR #16018 to fix this in master (the code has diverged enough that it's easier to just have separate PRs for v7 and master).

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit afcb3cf:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration

@msft-github-bot
Copy link
Contributor

msft-github-bot commented Nov 20, 2020

Perf Analysis

No significant results to display.

All results

Scenario Render type 7.0 Ticks PR Ticks Iterations Status
BaseButton mount 969 980 5000
Breadcrumb mount 42535 42666 5000
Checkbox mount 1675 1669 5000
CheckboxBase mount 1422 1378 5000
ChoiceGroup mount 5290 5326 5000
ComboBox mount 954 950 1000
CommandBar mount 7841 7822 1000
ContextualMenu mount 13850 13862 1000
DefaultButton mount 1233 1247 5000
DetailsRow mount 3934 3942 5000
DetailsRowFast mount 3896 3969 5000
DetailsRowNoStyles mount 3695 3694 5000
Dialog mount 1631 1537 1000
DocumentCardTitle mount 1824 1937 1000
Dropdown mount 2684 2741 5000
FocusTrapZone mount 1878 1827 5000
FocusZone mount 1868 1960 5000
IconButton mount 1868 1928 5000
Label mount 368 354 5000
Layer mount 2070 2063 5000
Link mount 460 471 5000
MenuButton mount 1577 1608 5000
MessageBar mount 2066 2155 5000
Nav mount 3414 3483 1000
OverflowSet mount 1523 1520 5000
Panel mount 1538 1534 1000
Persona mount 862 897 1000
Pivot mount 1515 1522 1000
PrimaryButton mount 1413 1343 5000
Rating mount 8344 8336 5000
SearchBox mount 1416 1392 5000
Shimmer mount 2856 2761 5000
Slider mount 1633 1620 5000
SpinButton mount 5276 5372 5000
Spinner mount 424 419 5000
SplitButton mount 3453 3320 5000
Stack mount 557 540 5000
StackWithIntrinsicChildren mount 1643 1580 5000
StackWithTextChildren mount 5040 5125 5000
SwatchColorPicker mount 10688 10796 5000
TagPicker mount 2942 3057 5000
TeachingBubble mount 51122 51671 5000
Text mount 470 464 5000
TextField mount 1431 1454 5000
Toggle mount 888 867 5000
button mount 113 126 5000

@size-auditor
Copy link

size-auditor bot commented Nov 20, 2020

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react office-ui-fabric-react-SearchBox 180.496 kB 180.515 kB ExceedsBaseline     19 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: 619dbd44312fa9fc85382f8213e77c1b2a392f91 (build)

…ack the call to stopPropagation if the onKeyDown handler calls preventDefault.
@ecraig12345 ecraig12345 merged commit 64f3aef into microsoft:7.0 Nov 25, 2020
@msft-github-bot
Copy link
Contributor

🎉office-ui-fabric-react@v7.153.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants