mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
ui: Replace set_up_scrollbar with data-simplebar attribute.
With perfectScrollbar, we needed to call a function from JavaScript to enable a scrollbar on a new element, but simplebar has a much simpler default API one can do by using data-simplebar attributes in the HTML. So we can delete all the scrollbar creation/deletion code. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
119948022f
commit
01613e71fb
@@ -19,7 +19,6 @@ const _document = {
|
||||
const _channel = {};
|
||||
|
||||
const _ui = {
|
||||
set_up_scrollbar: function () {},
|
||||
get_content_element: element => element,
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ set_global('resize', {
|
||||
resize_stream_filters_container: function () {},
|
||||
});
|
||||
set_global('ui', {
|
||||
set_up_scrollbar: function () {},
|
||||
get_content_element: element => element,
|
||||
});
|
||||
set_global('stream_popover', {
|
||||
|
||||
@@ -74,7 +74,6 @@ zrequire('util');
|
||||
|
||||
util.is_mobile = () => false;
|
||||
templates.render = () => 'some-html';
|
||||
ui.set_up_scrollbar = () => {};
|
||||
ui.get_scroll_element = element => element;
|
||||
|
||||
zrequire('echo');
|
||||
|
||||
Reference in New Issue
Block a user