mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-04 19:54:32 +08:00
fix(tooltip): change tooltip delay to 2 seconds
Prevent from ever showing up in the corner
This commit is contained in:
parent
9431da5321
commit
4223fa089d
1 changed files with 9 additions and 2 deletions
|
@ -26,8 +26,8 @@ class Tooltip extends React.Component
|
|||
|
||||
componentWillMount: =>
|
||||
@CONTENT_PADDING = 15
|
||||
@DEFAULT_DELAY = 1500
|
||||
@KEEP_DELAY = 500
|
||||
@DEFAULT_DELAY = 2000
|
||||
@KEEP_DELAY = 300
|
||||
@_showDelay = @DEFAULT_DELAY
|
||||
@_showTimeout = null
|
||||
@_showDelayTimeout = null
|
||||
|
@ -103,6 +103,13 @@ class Tooltip extends React.Component
|
|||
tooltipPos = "above"
|
||||
top = dim.top - TOOLTIP_HEIGHT
|
||||
|
||||
# If for some reason the element was removed from underneath us, we
|
||||
# won't know until we get here. The element's dimensions will return 0
|
||||
# ,0, which we can use to filter out bad displays
|
||||
if left < 5 and top < 5
|
||||
@_hideTooltip()
|
||||
return
|
||||
|
||||
@setState
|
||||
top: top
|
||||
pos: tooltipPos
|
||||
|
|
Loading…
Add table
Reference in a new issue