mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-17 21:15:47 +02:00
Revert smooth scrolling fix and rewrite horizontal scrolling fix to avoid column jumping
This commit is contained in:
parent
d2445be155
commit
dd77b5bcbb
@ -1374,11 +1374,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Remove column mouse wheel handler, which allows smooth scrolling inside columns, and horizontally scrolling column container when holding Shift.
|
// Block: Fix broken horizontal scrolling of column container when holding Shift. TODO Fix broken smooth scrolling.
|
||||||
//
|
//
|
||||||
if (ensurePropertyExists(TD, "ui", "columns", "setupColumnScrollListeners")){
|
if (ensurePropertyExists(TD, "ui", "columns", "setupColumnScrollListeners")){
|
||||||
TD.ui.columns.setupColumnScrollListeners = appendToFunction(TD.ui.columns.setupColumnScrollListeners, function(e){
|
TD.ui.columns.setupColumnScrollListeners = appendToFunction(TD.ui.columns.setupColumnScrollListeners, function(column){
|
||||||
$(".js-column[data-column='"+e.model.getKey()+"']").off("mousewheel onmousewheel");
|
let ele = $(".js-column[data-column='"+column.model.getKey()+"']");
|
||||||
|
|
||||||
|
ele.off("onmousewheel").on("mousewheel", ".scroll-v", function(e){
|
||||||
|
if (e.shiftKey){
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.TDGF_prioritizeNewestEvent(ele[0], "mousewheel");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user