Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Triggering after analert() in an event handler results in a JS error #5459

Closed
Assignees
mgol
Milestone
@AllanJard

Description

@AllanJard

Description

It appears that if I trigger ablur event, immediately after analert() inside a click event handler, it results in an error:

Uncaught TypeError: saved.slice is not a function

This is happening in jQuery 3.7.1 and 4.0.0-beta. But not in 3.5.1. I wonderif this issue might be related.

Link to test case

The way to reproduce this is quite simple:

$('button').on('click',function(e){alert('Hello');$(this).trigger('blur');})

https://jsbin.com/vuquzepidi/edit?html%2Cjs%2Coutput=

I've found that if I useconsole.log instead ofalert() it works just fine. Also if I put the trigger into asetTimeout it works just fine. Likewise if I change it to trigger afocus event it works. I did try afocus before theblur, wondering if the alert might cause the button to loose focus, but no change, and even if it did, I would have expected an error.

Apologies, I haven't yet dug into the code to see what might be happening - I can see in the debugger thatsaved istrue, but I've not looked to see why that is yet.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp