Skip to content

feat: change events to align with native browser behavior #476

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 26 commits into from
May 12, 2023

Conversation

nielslyngsoe
Copy link
Member

@nielslyngsoe nielslyngsoe commented May 8, 2023

Notice this should go into a new Mayor version. Please create such a branch, there might be other things to join such a release.

Changing the Events Bubbles and Composed to match their equivalent browser native event.

Notice the change log of the events in file docs/EVENTS.md

As well some events have been cancelable.

Description

Changes the UUIEvent to not bubble or composed, and makes it up to the individual specific event to set this them selfs.
Then each event has been changed to what makes sense in relation to Native Browser Events.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, do not impact compiled assets)

Motivation and context

We had to ensure we only have composed events when it makes sense. Otherwise, we would get unexpected events.

How to test?

Well, I'm not sure how to test this in the best way, but it should take part of a new Mayor version.

Screenshots (if appropriate)

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@iOvergaard iOvergaard changed the title Changing events, to align with Native feat: change events to align with native browser behavior May 11, 2023
@iOvergaard iOvergaard added feature Something we are looking to build notable labels May 11, 2023
@iOvergaard iOvergaard self-requested a review May 12, 2023 12:05
Copy link
Contributor

@iOvergaard iOvergaard left a comment

Choose a reason for hiding this comment

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

LGTM

@iOvergaard iOvergaard merged commit 814bdcc into v1/contrib May 12, 2023
@iOvergaard iOvergaard deleted the v1/feature/events-as-native branch May 12, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something we are looking to build notable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants