Skip to content

Commit

Permalink
Update event-handler.js
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and GeoSot committed May 3, 2022
1 parent cdb1979 commit 4525209
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions js/src/dom/event-handler.js
Expand Up @@ -128,9 +128,8 @@ function findHandler(events, callable, delegationSelector = null) {

function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
const isDelegated = typeof handler === 'string'
const callable = isDelegated ?
delegationFunction :
(handler || delegationFunction) // todo: tooltip passes `false` instead of selector, so we need to check
// todo: tooltip passes `false` instead of selector, so we need to check
const callable = isDelegated ? delegationFunction : (handler || delegationFunction)
let typeEvent = getTypeEvent(originalTypeEvent)

if (!nativeEvents.has(typeEvent)) {
Expand Down

0 comments on commit 4525209

Please sign in to comment.