Skip to content

Update events.md #1321

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

Closed
wants to merge 1 commit into from
Closed

Update events.md #1321

wants to merge 1 commit into from

Conversation

wxsms
Copy link
Member

@wxsms wxsms commented Nov 11, 2021

Description of Problem

.prevent dose not prevent click itself, but its default behavior.

Copy link

@mehanalavimajd mehanalavimajd left a comment

Choose a reason for hiding this comment

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

I agree but I think it would be better if you delete the single quotation

@wxsms
Copy link
Member Author

wxsms commented Nov 12, 2021

I agree but I think it would be better if you delete the single quotation

click -> click's default behavior.

clicks -> clicks' default behavior.

the single quotation is for plural. but it can also be default behavior of clicks of cause.

@skirtles-code
Copy link
Contributor

Thanks for the PR!

In my opinion, trying to be more precise just makes it more difficult to follow. I don't know whether it's worth making a distinction between 'preventing a click' and 'preventing a click's default behavior' in the context of this sentence. It's a pretty subtle distinction and I don't think the reader is likely to be confused by the simplified version. Establishing the exact purpose of the prevent modifier is handled earlier in the section, by the point we reach this sentence I think just using the word 'prevent' is sufficient.

But I'll leave this open for now to see what others think.

@wxsms
Copy link
Member Author

wxsms commented Nov 12, 2021

there's another tip below which mentions about default behavior:

Don't use .passive and .prevent together, because .prevent will be ignored and your browser will probably show you a warning. Remember, .passive communicates to the browser that you don't want to prevent the event's default behavior.

maybe for consistence, when we mention it here, we should also mention it there.

and for my opinion, prevent event and prevent event's default behavior has huge difference, which I think that the front one means prevent the event itself from being trigger.

@wxsms
Copy link
Member Author

wxsms commented Jan 9, 2022

is merged in #1425, closing.

@wxsms wxsms closed this Jan 9, 2022
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.

3 participants