diff --git a/CHANGELOG.md b/CHANGELOG.md index 89237475b..477d2c7e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Fix quote previews getting 'stuck' in Opera. + ### 3.3.1 - *2013-05-04* - Fix whitespaces not being preserved in code tags in /g/. diff --git a/src/Quotelinks/QuotePreview.coffee b/src/Quotelinks/QuotePreview.coffee index e1b9f47ed..399bf5ce6 100644 --- a/src/Quotelinks/QuotePreview.coffee +++ b/src/Quotelinks/QuotePreview.coffee @@ -28,6 +28,21 @@ QuotePreview = cb: QuotePreview.mouseout asapTest: -> qp.firstElementChild + <% if (type === 'userjs') { %> + # XXX Opera workaround for "no mouseout fired" bug. + # Remove it once Opera uses Blink. + root = @ + workaround = (e) -> + if @ is root + e.stopPropagation() + return + $.event 'mouseout', null, root + $.off d, 'mousemove', workaround + $.off root, 'mousemove', workaround + $.on d, 'mousemove', workaround + $.on root, 'mousemove', workaround + <% } %> + return unless origin = g.posts["#{boardID}.#{postID}"] if Conf['Quote Highlighting']