mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-13 16:21:07 +01:00
Trigger hovercards on mousemove
Summary: I often scroll with keyboard with cursor being somewhere on the screen. Popping hovercards under the cursor is quite distracting. Test Plan: It works like I want in Firefox. There's surprisingly no flickering even though I expected some. It works like before in Chrome, perhaps it sends mousemove events anyway? Reviewers: AnhNhan, epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5632
This commit is contained in:
parent
925c507705
commit
7e93e9fbe9
2 changed files with 7 additions and 38 deletions
|
@ -1899,7 +1899,7 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'javelin-behavior-phabricator-hovercards' =>
|
||||
array(
|
||||
'uri' => '/res/7c16603a/rsrc/js/application/core/behavior-hovercard.js',
|
||||
'uri' => '/res/b8b4bb47/rsrc/js/application/core/behavior-hovercard.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
|
@ -3639,33 +3639,6 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/css/application/ponder/vote.css',
|
||||
),
|
||||
'raphael-core' =>
|
||||
array(
|
||||
'uri' => '/res/3f48575a/rsrc/js/raphael/raphael.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/js/raphael/raphael.js',
|
||||
),
|
||||
'raphael-g' =>
|
||||
array(
|
||||
'uri' => '/res/b07e5245/rsrc/js/raphael/g.raphael.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/js/raphael/g.raphael.js',
|
||||
),
|
||||
'raphael-g-line' =>
|
||||
array(
|
||||
'uri' => '/res/a59c8556/rsrc/js/raphael/g.raphael.line.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/js/raphael/g.raphael.line.js',
|
||||
),
|
||||
'releeph-branch' =>
|
||||
array(
|
||||
'uri' => '/res/6ad6420d/rsrc/css/application/releeph/releeph-branch.css',
|
||||
|
@ -3864,15 +3837,6 @@ celerity_register_resource_map(array(
|
|||
),
|
||||
'disk' => '/rsrc/css/sprite-tokens.css',
|
||||
),
|
||||
'stripe-core' =>
|
||||
array(
|
||||
'uri' => '/res/3b0f0ad4/rsrc/js/stripe/stripe_core.js',
|
||||
'type' => 'js',
|
||||
'requires' =>
|
||||
array(
|
||||
),
|
||||
'disk' => '/rsrc/js/stripe/stripe_core.js',
|
||||
),
|
||||
'stripe-payment-form-css' =>
|
||||
array(
|
||||
'uri' => '/res/634a6371/rsrc/css/application/phortune/stripe-payment-form.css',
|
||||
|
|
|
@ -10,8 +10,13 @@
|
|||
|
||||
JX.behavior('phabricator-hovercards', function(config) {
|
||||
|
||||
// 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
|
||||
// under the mouse cursor randomly placed somewhere on the screen. This
|
||||
// unfortunatelly doesn't work in Google Chrome which triggers both mousemove
|
||||
// and mouseover in this case but works in other browsers.
|
||||
JX.Stratcom.listen(
|
||||
'mouseover',
|
||||
'mousemove',
|
||||
'hovercard',
|
||||
function (e) {
|
||||
if (JX.Device.getDevice() != 'desktop') {
|
||||
|
|
Loading…
Reference in a new issue