amsul / amsul/pickadate.js

Event click error in indexOf property in picker.js file

オープン
#1,237 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
7.6k
フォーク
981
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。