Skip to content

Prevent default when hitting enter #3195

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

Merged
merged 1 commit into from
Sep 28, 2022
Merged

Conversation

srawlins
Copy link
Member

Fixes #3172

Use event.preventDefault instead of event.stopPropagation.

CC @kevmoo I don't know what I'm doing here. I tested this a lot and it seems to work OK.

Copy link
Member

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

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

Double-checked locally, too. Yup. User error. Well done! thanks!

@@ -146,6 +146,10 @@ const _htmlEscape = HtmlEscape();

final _containerMap = <String, Element>{};

// TODO(srawlins): Break up this huge function into smaller parts. One big trick
// here is maintaining how `selectedElement` is used. I suspect a class with
// fields maintaining state would be a good solution. Another big trick is
Copy link
Member

Choose a reason for hiding this comment

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

+1 to putting all of the state in a private class!

@srawlins srawlins merged commit 121ff17 into dart-lang:master Sep 28, 2022
@srawlins srawlins deleted the fix-enter-key branch September 28, 2022 02:37
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.

"Enter" to see full search results doesn't work
2 participants