Florian Motteau created OFBIZ-13346:
---------------------------------------

             Summary: Remove jQuery object custom function, avoid using 
internal jQueryUI function
                 Key: OFBIZ-13346
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13346
             Project: OFBiz
          Issue Type: Task
    Affects Versions: 24.09.04
            Reporter: Florian Motteau
             Fix For: Upcoming Branch
         Attachments: image-2026-01-21-17-15-58-560.png, 
image-2026-01-21-17-20-19-992.png

In 
[https://github.com/apache/ofbiz-framework/blob/trunk/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js
 
:|https://github.com/apache/ofbiz-framework/blob/trunk/themes/common-theme/webapp/common-theme/js/util/OfbizUtil.js,]

!image-2026-01-21-17-15-58-560.png!

The `_form()` function is an internal function from the UI component library 
jQuery UI (which returns the form DOM element from a form field). It should not 
be used outside of jQueryUI. This function war formerly named `form()`, then it 
has been renamed by jQueryUI, and then renamed too in this file. We should 
simply not use this function here.

In the same file, there is this code :

!image-2026-01-21-17-20-19-992.png!

It's a bad practice to add functions or properties on a prototype that comes 
from an external library like jQuery. That can lead to confusion for future 
developers, or cause debugging difficulties if jQuery decides to add a 
`getForm` function in a future release.

These functions should be standard standalone functions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to