Bugzilla – Attachment 146817 Details for
Bug 30975
Use event delegation for framework plugins to avoid using private jQuery method _data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30975: Call preventDefault only for click events
Bug-30975-Call-preventDefault-only-for-click-event.patch (text/plain), 1.00 KB, created by
Julian Maurice
on 2023-02-17 10:40:23 UTC
(
hide
)
Description:
Bug 30975: Call preventDefault only for click events
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2023-02-17 10:40:23 UTC
Size:
1.00 KB
patch
obsolete
>From e3ffe908ad185e36354750c5735325bdf401d2e6 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 17 Feb 2023 11:39:58 +0100 >Subject: [PATCH] Bug 30975: Call preventDefault only for click events > >--- > koha-tmpl/intranet-tmpl/prog/js/cataloging.js | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >index 30020e7f5a..08a3fc7f74 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/cataloging.js >@@ -604,7 +604,11 @@ function registerFrameworkPluginHandler(name, eventType, handler) { > } > $(document).ready(function() { > function callPluginEventHandler (event) { >- event.preventDefault(); >+ // Prevent "jump to top" >+ if (event.type === 'click') { >+ event.preventDefault(); >+ } >+ > event.stopPropagation(); > > const plugin = event.target.getAttribute('data-plugin'); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30975
:
136135
|
138318
|
140763
|
140810
|
146146
|
146817
|
158064