20 Commits

Author SHA1 Message Date
Amin Yahyaabadi
6473f52c67 Convert var to const/let in src files
```
npm install -g jscodeshift
git clone https://github.com/cpojer/js-codemod.git
jscodeshift -t js-codemod/transforms/no-vars.js ./src
```
2021-03-30 10:12:02 -05:00
Amin Yahyaabadi
a68663ef48 explicit capture option in addEventListener (#21562)
Based on the docs true is equal to {capture: true}

> In older versions of the DOM specification, the third parameter of addEventListener() was a Boolean value indicating whether or not to use capture. Over time, it became clear that more options were needed. Rather than adding more parameters to the function (complicating things enormously when dealing with optional values), the third parameter was changed to an object that can contain various properties defining the values of options to configure the process of removing the event listener.

https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Improving_scrolling_performance_with_passive_listeners
2020-11-03 16:20:58 +03:00
Rafael Oleza
7f3f040628 Reformat all JS files using prettier 2019-05-31 18:33:56 +02:00
Tilde Ann Thurium
f7b95d03d3 fixes bug with keyboard input in click tooltips
Co-Authored-By: David Wilson <daviwil@users.noreply.github.com>
2018-09-12 16:17:30 -07:00
Will Binns-Smith
882a1924f0 Remove one-off eslint global pragmas in favor of envs 2017-08-20 19:55:00 -07:00
Michelle Tilley
63920c2a78 🎨 2017-04-26 19:27:23 -07:00
Michelle Tilley
ca9054a4f8 👕 Fix linting errors 2017-04-26 16:01:43 -07:00
Michelle Tilley
dc6988c945 Reposition Tooltips when they mutate 2017-04-26 15:49:01 -07:00
Michelle Tilley
d56c1e292e Add Tooltip#recalculatePosition which resets the tooltip's position 2017-04-26 15:48:22 -07:00
Christopher Chedeau
6f5e0ec48a Introduce follow through behavior for tooltips
Inside of Nuclide, we have multiple places where we have multiple icons close together that have a tooltip: the left toolbar, the bottom status bar, the debugger icons...

The current behavior is very frustrating as you've got to wait for the delay on every single one of them. But, we have a clear signal that the user wants a tooltip when s/he waits the time to see it and it's likely that moving the mouse over the next item quickly means that s/he wants to see it as well.

This pull request introduces the concept of follow through: if you have seen a tooltip, you're going to instantly see tooltip on the next element you mouse over within a short timer (300ms right now).

Test Plan:
Video before:
![](http://g.recordit.co/7PCg0hjohP.gif)

Video after:
![](http://g.recordit.co/9OnZCvy9oI.gif)

Released under CC0
2016-11-01 11:35:06 -07:00
Nathan Sobo
e71e1f4ed1 Test custom class option 2016-10-10 14:08:51 -06:00
Nathan Sobo
718cc017e6 Hide click-triggered tooltips when clicking anywhere outside of tooltip
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Nathan Sobo
253917f007 Make tooltip accept an item option instead of tooltipElement
...and use view registry to resolve it to a view when showing the tooltip.

Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Nathan Sobo
e9200e5bc0 WIP: Add ability to use custom elements inside tooltips 2016-10-10 14:08:51 -06:00
Johnston Jiaa
5dfd0c9102 Show tooltip immediately if the tooltip trigger is manual 2016-02-28 12:12:13 -05:00
joshaber
6948dd4e8d Linter was mad about these now. 2016-01-07 17:13:56 -05:00
Nathan Sobo
292289aed7 Handle clicks on descendants of links correctly in window event handler 2015-09-18 20:48:50 -06:00
Nathan Sobo
206e846cda Fix linter errors 2015-09-18 20:48:50 -06:00
Nathan Sobo
43de55b179 Fix delegated tooltips 2015-09-18 20:48:50 -06:00
Nathan Sobo
3c58e221a2 Add custom tooltip implementation that doesn’t depend on jQuery 2015-09-18 20:48:49 -06:00