Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the Context UI inline editor, JavaScript will generate errors if using jQuery 1.9 or greater. This is due to $.browser
no longer being supported.
The better long term solution is to replace the code with feature detection rather than browser detection, but the attached patch should serve as a temporary replacement until that is done.
I'd appreciate any feedback, thanks.
Comments
Comment #2
hass CreditAttribution: hass commentedPlease rewrite to feature detection so we are finally done.
Comment #3
ron_s CreditAttribution: ron_s commentedOk, see attached patch.
The
$.browser
calls ineditStart
andeditFinish
must continue to stay in the code, because they are specific to a bug in jQuery UI 1.6.We have moved them inside the conditional so they are never accessed if someone is running a newer version.
Comment #4
ron_s CreditAttribution: ron_s commentedAfter further testing, we realized some CSS adjustments are needed to support this approach. Will post an updated patch shortly.
Comment #5
ron_s CreditAttribution: ron_s commentedThis should take care of the issue. Just needed some extra CSS to ensure standard Drupal contextual links are still accessible.
Comment #6
ron_s CreditAttribution: ron_s commentedSorry, one additional update. Forgot to copy over two edits to handle contextual links when a browser does not support the
pointer-events
feature. Thanks.