Skip to content

fix(replay): Default ignore file inputs for dead clicks #14227

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 4 commits into from
Nov 19, 2024

Conversation

chargome
Copy link
Member

Adds a default selector for ignoring dead clicks on file inputs.

ref #80275

@chargome chargome self-assigned this Nov 11, 2024
@chargome chargome requested a review from a team as a code owner November 11, 2024 15:21
@@ -32,6 +32,8 @@ const MEDIA_SELECTORS =

const DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];

const DEFAULT_SLOW_CLICK_IGNORE_SELECTORS = ['input[type="file"]'];
Copy link
Member

Choose a reason for hiding this comment

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

Hmm wait, do we not already do that? in handleClick.ts we have this code:

// If <input> tag, we only want to consider input[type='submit'] & input[type='button']
  if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {
    return true;
  }

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah you are right, the test also passes without the change 🤔

Copy link
Contributor

github-actions bot commented Nov 11, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.77 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.27 KB - -
@sentry/browser (incl. Tracing, Replay) 72 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.38 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.31 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.17 KB - -
@sentry/browser (incl. Feedback) 39.93 KB - -
@sentry/browser (incl. sendFeedback) 27.42 KB - -
@sentry/browser (incl. FeedbackAsync) 32.23 KB - -
@sentry/react 25.52 KB - -
@sentry/react (incl. Tracing) 38.23 KB - -
@sentry/vue 26.92 KB - -
@sentry/vue (incl. Tracing) 37.1 KB - -
@sentry/svelte 22.91 KB - -
CDN Bundle 24.13 KB - -
CDN Bundle (incl. Tracing) 37.05 KB - -
CDN Bundle (incl. Tracing, Replay) 71.72 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.07 KB - -
CDN Bundle - uncompressed 70.73 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.94 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.46 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.68 KB - -
@sentry/nextjs (client) 38.35 KB - -
@sentry/sveltekit (client) 35.85 KB - -
@sentry/node 134.33 KB - -
@sentry/node - without tracing 96.2 KB - -
@sentry/aws-serverless 106.48 KB - -

View base workflow run

@chargome chargome closed this Nov 13, 2024
@billyvg
Copy link
Member

billyvg commented Nov 13, 2024

Ah my fault @chargome -- is it worth keeping the test?

@chargome chargome reopened this Nov 14, 2024
@chargome chargome requested a review from billyvg November 19, 2024 09:58
@chargome chargome merged commit 4ffc81a into develop Nov 19, 2024
52 checks passed
@chargome chargome deleted the cg/ignore-deadclick-on-input-file branch November 19, 2024 15:53
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