Get rid of $.asap in UI.hover.
This commit is contained in:
parent
0546e439ea
commit
b07c215d62
@ -310,7 +310,7 @@ UI = do ->
|
||||
$.off d, 'mouseup', @up
|
||||
$.set "#{@id}.position", @style.cssText
|
||||
|
||||
hoverstart = ({root, el, latestEvent, endEvents, asapTest, height, cb, noRemove}) ->
|
||||
hoverstart = ({root, el, latestEvent, endEvents, height, cb, noRemove}) ->
|
||||
o = {
|
||||
root
|
||||
el
|
||||
@ -327,10 +327,10 @@ UI = do ->
|
||||
o.hover = hover.bind o
|
||||
o.hoverend = hoverend.bind o
|
||||
|
||||
$.asap ->
|
||||
!el.parentNode or asapTest()
|
||||
, ->
|
||||
o.hover o.latestEvent
|
||||
new MutationObserver(->
|
||||
o.hover o.latestEvent if el.parentNode
|
||||
).observe el, {childList: true}
|
||||
|
||||
$.on root, endEvents, o.hoverend
|
||||
if $.x 'ancestor::div[contains(@class,"inline")][1]', root
|
||||
|
||||
@ -57,7 +57,6 @@ ImageHover =
|
||||
el: el
|
||||
latestEvent: e
|
||||
endEvents: 'mouseout click'
|
||||
asapTest: -> true
|
||||
height: scale * height + padding
|
||||
noRemove: true
|
||||
cb: ->
|
||||
|
||||
@ -32,7 +32,6 @@ QuotePreview =
|
||||
latestEvent: e
|
||||
endEvents: 'mouseout click'
|
||||
cb: QuotePreview.mouseout
|
||||
asapTest: -> qp.firstElementChild
|
||||
|
||||
return unless origin = g.posts["#{boardID}.#{postID}"]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user