Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/behavior-hovercard.js
/** | /** | ||||
* @provides javelin-behavior-phabricator-hovercards | * @provides javelin-behavior-phui-hovercards | ||||
* @requires javelin-behavior | * @requires javelin-behavior | ||||
* javelin-behavior-device | * javelin-behavior-device | ||||
* javelin-stratcom | * javelin-stratcom | ||||
* javelin-vector | * javelin-vector | ||||
* phabricator-hovercard | * phui-hovercard | ||||
* @javelin | * @javelin | ||||
*/ | */ | ||||
JX.behavior('phabricator-hovercards', function() { | JX.behavior('phui-hovercards', function() { | ||||
// We listen for mousemove instead of mouseover to handle the case when user | // We listen for mousemove instead of mouseover to handle the case when user | ||||
// scrolls with keyboard. We don't want to display hovercard if node gets | // scrolls with keyboard. We don't want to display hovercard if node gets | ||||
// under the mouse cursor randomly placed somewhere on the screen. This | // under the mouse cursor randomly placed somewhere on the screen. This | ||||
// unfortunately doesn't work in Google Chrome which triggers both mousemove | // unfortunately doesn't work in Google Chrome which triggers both mousemove | ||||
// and mouseover in this case but works in other browsers. | // and mouseover in this case but works in other browsers. | ||||
JX.Stratcom.listen( | JX.Stratcom.listen( | ||||
'mousemove', | 'mousemove', | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |