Skip to content
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

fix: event.target.getAttribute('target') returns null when it does not exist. #19262

Merged
merged 3 commits into from
Dec 10, 2021

Conversation

sainthkh
Copy link
Contributor

@sainthkh sainthkh commented Dec 6, 2021

User facing changelog

event.target.getAttribute('target') returns null when it does not exist. This behavior is introduced in #16394.

Additional details

  • Why was this change necessary? => It's not the default browser behavior.
  • What is affected by this change? => N/A
  • Any implementation details to explain? => We're checking if the e.target.target is set or not and returns null it isn't.

How has the user experience changed?

function handleClick(e) {
  e.target.getAttribute('target') // => before: '', after: null
}

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 6, 2021

Thanks for taking the time to open a PR!

@sainthkh sainthkh marked this pull request as ready for review December 6, 2021 03:16
@sainthkh sainthkh requested a review from a team as a code owner December 6, 2021 03:16
@sainthkh sainthkh requested review from jennifer-shehane and removed request for a team December 6, 2021 03:16
@jennifer-shehane jennifer-shehane removed their request for review December 7, 2021 22:10
@mjhenkes mjhenkes merged commit 09bcc5b into cypress-io:develop Dec 10, 2021
tgriesser added a commit that referenced this pull request Dec 15, 2021
* develop:
  chore(deps): update dependency ssri to 6.0.2 [security] (#19351)
  chore: Fix server unit tests running on mac by using actual tmp dir (#19350)
  fix: Add more precise types to Cypress.Commands (#19003)
  fix: Do not screenshot or trigger the failed event when tests are skipped (#19331)
  fix (#19262)
  fix: throw when writing to 'read only' properties of `config` (#18896)
  fix: close chrome when closing electron (#19322)
  fix: disable automatic request retries (#19161)
  chore: refactor cy funcs (#19080)
  chore(deps): update dependency @ffmpeg-installer/ffmpeg to v1.1.0 🌟 (#19300)
tgriesser added a commit that referenced this pull request Dec 16, 2021
…cycle

* 10.0-release:
  build: remove syncRemoteGraphQL from codegen
  chore: fix incorrect type from merge
  build: allow work with local dashboard (#19376)
  chore: Test example recipes against chrome (#19362)
  test(unify): Settings e2e tests (#19324)
  chore(deps): update dependency ssri to 6.0.2 [security] (#19351)
  fix: spec from story generation, add deps for install (#19352)
  chore: Fix server unit tests running on mac by using actual tmp dir (#19350)
  fix: Add more precise types to Cypress.Commands (#19003)
  fix: Do not screenshot or trigger the failed event when tests are skipped (#19331)
  fix (#19262)
  fix: throw when writing to 'read only' properties of `config` (#18896)
  fix: close chrome when closing electron (#19322)
  fix: disable automatic request retries (#19161)
  chore: refactor cy funcs (#19080)
  chore(deps): update dependency @ffmpeg-installer/ffmpeg to v1.1.0 🌟 (#19300)
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.

Cypress 7 & 8 changed Element.getAttribute
4 participants