1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-21 06:15:47 +02:00

Disable reply middle-click in temporary columns & fix random reloads from middle-clicks

This commit is contained in:
chylex 2017-09-29 14:58:58 +02:00
parent 4a404ecabc
commit 9b139132a1

View File

@ -796,11 +796,13 @@
});
//
// Block: Make middle click on tweet reply icon open the compose drawer.
// Block: Make middle click on tweet reply icon open the compose drawer. Only works for non-temporary columns.
//
app.delegate(".js-reply-action", "mousedown", function(e){
app.delegate(".js-reply-action", "auxclick", function(e){
if (e.which === 2){
if ($("[data-drawer='compose']").hasClass("is-hidden")){
let column = $(this).closest(".js-column");
if (column && column.hasClass("column") && $("[data-drawer='compose']").hasClass("is-hidden")){
$(document).trigger("uiDrawerShowDrawer", {
drawer: "compose",
withAnimation: true