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

Event click error in indexOf property in picker.js file #1237

Open
AlbertGM24 opened this issue Sep 28, 2021 · 0 comments
Open

Event click error in indexOf property in picker.js file #1237

AlbertGM24 opened this issue Sep 28, 2021 · 0 comments

Comments

@AlbertGM24
Copy link

This error happen using a node app, in the web app work perfectly. When an event click occurs with the picker the function "getRealEventTarget" receive the event and the element.
`function getRealEventTarget( event, ELEMENT ) {

var path = []

if ( event.path ) {
    path = event.path
}

if ( event.originalEvent && event.originalEvent.path ) {
    path = event.originalEvent.path
}

if ( path && path.length > 0 ) {
    if ( ELEMENT && path.indexOf( ELEMENT ) >= 0 ) {
        return ELEMENT
    } else {
        return path[0]
    }
}

return event.target

}`
In the node app the variable path is not an array but a nodeList and nodeList don't have the property "indexOf" giving in the consle the error "undefined is not a function" and stop executing the next code and ,in my case, preventing me from closing the calendar keeping it open.

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

No branches or pull requests

1 participant