RSS Feed/News XF JS Events don't bubble up the DOM tree

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
27,321
Points
823

Reputation:

It looks like all events triggered with XF.customEvent are configured to not bubble up through the DOM. The constructor specifically deletes the bubbles option from the config. As such, it is impossible to attach any listener to such an event if the event target is not immediately present when the JS is loaded, such as when the target is inside a modal.

In my specific instance I have an auto-complete field inside a modal, that I have attached a listener to with the code below...

Read more

Continue reading...
 
Status
Not open for further replies.
Top