From 8a074d8246ae8eb1ef3c152af107cb00deeac250 Mon Sep 17 00:00:00 2001 From: Markerov Date: Mon, 12 Jan 2015 11:50:25 +0800 Subject: [PATCH] highlightReply fix for Gecko Issue https://8chan.co/meta/res/45789.html --- templates/main.js | 5 +++-- templates/post_reply.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/main.js b/templates/main.js index 74cf40e6..946cb378 100644 --- a/templates/main.js +++ b/templates/main.js @@ -253,11 +253,12 @@ function get_cookie(cookie_name) { } } -function highlightReply(id) { +function highlightReply(id, event) { if (typeof window.event != "undefined") { // don't highlight on middle click if (event.which == 2) return true; - if (active_page == 'thread' && typeof window.event.preventDefault != "undefined") window.event.preventDefault(); + var e = event || window.event; + if (active_page == 'thread' && typeof e.preventDefault != "undefined") e.preventDefault(); } var divs = document.getElementsByTagName('div'); diff --git a/templates/post_reply.html b/templates/post_reply.html index 4455a575..a88f9d5c 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -12,7 +12,7 @@ {% include 'post/time.html' %} {% include 'post/poster_id.html' %}  - No. + No. {{ post.id }}

{% include 'post/fileinfo.html' %}