When upgrading to the current SAPUI5 version from a version below 1.20 (released in April 2014), check whether the changes listed below influence your apps.
jQuery upgraded to version 1.10.2
QUnit upgraded to version 1.10.4
This upgrade may impact your SAPUI5 apps. The following sections give an overview of our findings and how to deal with them.
If you use additional open-source libraries that depend on jQuery, check whether they need to be upgraded as well.
This upgrade requires changes to SAPUI5 controls and may also influence other controls or the application. For more information about the jQuery upgrade, see the jQuery Upgrade Guide. The following list gives an overview of the changes that affect SAPUI5.
Setting height or width of a JQuery object
When setting the height or width of an object via jQuery(...).height("1px") and the object used the CSS-property box-sizing, the height of the box instead of the content was changed. As of jQuery 1.8.0, the function changes the content height regardless of the box-sizing property.
For more information and recommendations, see the jQuery API documentation on http://api.jquery.com.
jQuery(...).data("events") has been removed with jQuery 1.9. An alternative is now available and part of the QUnitUtils: jQuery#_sapTest_dataEvents().
strictEqual in QUnit tests
Do not compare jQuery(...).attr("tabindex") with strictEqual or ===. As an alternative, use string values or prop("tabindex") which returns a parsed value.
jQuery 1.10 converts font-weight: "normal" to the value 400. The workaround jQuery#_sapTest_cssFontWeight() is provided in QUnitUtils that hides the differences between browser and jQuery.
Check for jQuery version
To fix issues for a newer or different jQuery version, you can use jQuery.sap.Version(jQuery.fn.jquery).toString() or jQuery.sap.Version(jQuery.fn.jquery).getMajor() to check the version. You use this core function to check the major, minor, patch and all appending stuff of the version.
Deprecated and removed functions
Check for functions that have been deprecated in jQuery versions 1.7, 1.8, or 1.9 and may have been removed in jQuery 1.10. See the corresponding jQuery documentation.
This function has been set as deprecated in jQuery version 1.7 and was removed in jQuery version 1.9. For recommendations how to replace the .live() function, see the respective jQery documentation.
jQuery UI version 1.10.4 contains incompatible changes to jQuery UI version 1.8.23. For more information, see the jQuery UI 1.9 Upgrade Guide and the jQuery UI 1.10 Upgrade Guide.
A major incompatible change is in jQuery.ui.position, where the offset property has been removed. SAPUI5 runtime adopted this change, for example in Popup, but applications may need to adopt their logic too.
Also, the file names for jQuery UI effects have changed. Applications using the jQuery UI effects may also have to adopt their logic. In IE8 and jQuery version <1.8, the detection whether the new jQueryUi logic is active or not fails. This may be due to interaction issues between jQuery UI version 1.10 and jQuery version 1.7. In this case, the new jQuery UI position logic is used: Applications that still want to use jQuery version 1.7.1 and jQuery UI version 1.8 or older have to load the jQueryUI core and not only the position module.