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