The r5 version we currently ship dates back in April 2007. We should update it to r6 that was released in February 2011:

hoverIntent r6 (2011) has all the same functionality of r5 (2007) except that the Google Chrome defect (known defects) is fixed once you upgrade to jQuery 1.5.1

Update:

...this is now fixed in 7.x-3.x and we currently ship r7 of the library. Unfortunately, we cannot backport the upgrade to 7.x-2.x because in #2036601: Create a 7.x-3.x branch to support the latest versions of required js libraries - Keep 7.x-2.x compatible with default Drupal. we made it clear that we want to keep 2.x compatible with vanilla Drupal 7 (so that the module works straight out of the box). The r7 version of the library states that it requires jQuery 1.9.1+ and r6 jQuery 1.5.1+ and Drupal 7 ships with jQuery 1.4.4 by default:

https://github.com/briancherne/jquery-hoverIntent/blob/master/jquery.hov...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klonos’s picture

If #1411268: Support Libraries API for the js files. is to be accepted and implemented, this would be a breeze (no need for a new release from the module maintainer). All one would have to do is place the new version of the library under the /sites/all/libraries/hoverIntent directory in their drupal installation and they'd be good to go.

PS: This would also help us test the new r7 of hoverIntent that is currently under development and perhaps be ready for any required future code changes when it finally get released:

hoverIntent r7 (in development) will be backwards compatible with all current implementations and include hoverIntent custom events.

ericduran’s picture

1st lets get #1608510: Remove all drupal_add_js with hook_libraries in. Once that's in it'll be a lot simpler to update the library.

ericduran’s picture

Status: Active » Needs review
FileSize
4.06 KB

Here's a fix, this assumes the other patches have been applied.

klonos’s picture

...this assumes the other patches have been applied.

Do you mean the ones from #1608510: Remove all drupal_add_js with hook_libraries or others too?

xiukun.zhou’s picture

Status: Needs review » Fixed

#1608510: Remove all drupal_add_js with hook_libraries this patch already apply in nice_menus 7.x.2.3 , now you can using this method

/**
 * Implements hook_library_alter().
 */
function example_library_alter(&$libraries, $module) {
  // Update jquery.hoverIntent to version 0.6.
  if ($module == 'nice_menus' && isset($libraries['jquery.hoverIntent'])) {
    // Verify existing version is older than the one we are updating to.
    if (version_compare($libraries['jquery.hoverIntent']['version'], '0.6', '<')) {
      // Update the existing jquery.hoverIntent to version 0.6.
      $libraries['jquery.hoverIntent']['version'] = '0.6';
      $libraries['jquery.hoverIntent']['js'] = array(
        drupal_get_path('module', 'example') . '/jquery.hoverIntent-0.6.js' => array(),
      );
    }
  }
}
klonos’s picture

Title: Upgrade included hoverIntent library to r6 (currently shipping r5) » Upgrade included hoverIntent library to r7 (currently shipping r5)
Status: Fixed » Active

This issue is about upgrading the version included with the module to the latest available - not about allowing to people to override it with a custom one.

Overriding the included library should be "automated" by implementing #1411268: Support Libraries API for the js files..

xiukun.zhou’s picture

thanks klonos.
drupal 7 default jquery version is v1.4.4. hoverIntent r6 need jQuery 1.5.1. so this may be a bad idea.
you can be overiide it to hoverIntent r6. then use jquery update module update jquery version to > 1.5.1

xiukun.zhou’s picture

klonos’s picture

klonos’s picture

Issue summary: View changes

...updated versions' release dates and link to known issues.

klonos’s picture

klonos’s picture

Issue summary: View changes
klonos’s picture

Issue summary: View changes