Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | None | T59765 Provide JavaScript hook | |||
Resolved | Lydia_Pintscher | T63131 Eliminate or reduce delay between selection of property and displaying of input fields when adding statements | |||
Resolved | None | T58090 Do not change targets to javascript:void(0); on JavaScript load for various "edit" links | |||
Invalid | None | T56098 [Epic][UI] Front-end performance: Improve loading time of items | |||
Invalid | None | T78149 [Task] Prevent events from bubbling up the whole DOM unnecessarily |
Event Timeline
Widgets that aggregate other widgets should encapsulate their aggregated widgets' events using event.stopPropagation(). If parent components/widgets are to receive notification, these parent components should rely only on the events of their direct children--anything else implies a logical error. There is no need for events to bubble up any further than their parent component/widget.
Encapsulation is, for example, done in fingerprintview, where the propagation of the events of labelview, descriptionview and aliasesview is stopped. Encapsulation should be a general principle to avoid wasting performance for event bubbling that should not take place anyway.
However, we should not register event handlers just for the purpose of stopping event propagation since filling the event registry has some performance impact as well. Currently, all widgets use jQuery.Widget._trigger() which forwards to jQuery.trigger(). However, in our hierarchical structure, using triggerHandler() should not be just be sufficient but would actually propagate clean separation of the wiget responsibilities as described above.