mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 00:23:49 +00:00
dependencies: Upgrade simplebar from 4.2.3 to 5.0.7.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
0f4b6dd0c1
commit
2c4101dbc5
@@ -49,7 +49,7 @@
|
||||
"regenerator-runtime": "^0.13.3",
|
||||
"script-loader": "^0.7.2",
|
||||
"shebang-loader": "^0.0.1",
|
||||
"simplebar": "^4.1.0",
|
||||
"simplebar": "^5.0.7",
|
||||
"sortablejs": "^1.9.0",
|
||||
"sorttable": "^1.0.2",
|
||||
"source-sans-pro": "^3.6.0",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const SimpleBar = require("simplebar").default;
|
||||
const SimpleBar = require("simplebar/dist/simplebar.js");
|
||||
|
||||
// What, if anything, obscures the home tab?
|
||||
|
||||
@@ -13,16 +13,18 @@ exports.replace_emoji_with_text = function (element) {
|
||||
|
||||
exports.get_content_element = function (element_selector) {
|
||||
const element = element_selector.expectOne()[0];
|
||||
if (element.SimpleBar) {
|
||||
return $(element.SimpleBar.getContentElement());
|
||||
const sb = SimpleBar.instances.get(element);
|
||||
if (sb) {
|
||||
return $(sb.getContentElement());
|
||||
}
|
||||
return element_selector;
|
||||
};
|
||||
|
||||
exports.get_scroll_element = function (element_selector) {
|
||||
const element = element_selector.expectOne()[0];
|
||||
if (element.SimpleBar) {
|
||||
return $(element.SimpleBar.getScrollElement());
|
||||
const sb = SimpleBar.instances.get(element);
|
||||
if (sb) {
|
||||
return $(sb.getScrollElement());
|
||||
} else if ('simplebar' in element.dataset) {
|
||||
// The SimpleBar mutation observer hasn’t processed this element yet.
|
||||
// Create the SimpleBar early in case we need to add event listeners.
|
||||
@@ -33,8 +35,9 @@ exports.get_scroll_element = function (element_selector) {
|
||||
|
||||
exports.reset_scrollbar = function (element_selector) {
|
||||
const element = element_selector.expectOne()[0];
|
||||
if (element.SimpleBar) {
|
||||
element.SimpleBar.getScrollElement().scrollTop = 0;
|
||||
const sb = SimpleBar.instances.get(element);
|
||||
if (sb) {
|
||||
sb.getScrollElement().scrollTop = 0;
|
||||
} else {
|
||||
element.scrollTop = 0;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,6 @@ export default (env?: string): webpack.Configuration[] => {
|
||||
{ path: "blueimp-md5/js/md5.js" },
|
||||
{ path: "clipboard/dist/clipboard.js", name: "ClipboardJS" },
|
||||
{ path: "xdate/src/xdate.js", name: "XDate" },
|
||||
{ path: "simplebar/dist/simplebar.js"},
|
||||
{ path: "../static/third/marked/lib/marked.js" },
|
||||
{ path: "../static/generated/emoji/emoji_codes.js" },
|
||||
{ path: "../static/generated/pygments_data.js" },
|
||||
|
||||
@@ -10284,10 +10284,10 @@ simple-swizzle@^0.2.2:
|
||||
dependencies:
|
||||
is-arrayish "^0.3.1"
|
||||
|
||||
simplebar@^4.1.0:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/simplebar/-/simplebar-4.2.3.tgz#dac40aced299c17928329eab3d5e6e795fafc10c"
|
||||
integrity sha512-9no0pK7/1y+8/oTF3sy/+kx0PjQ3uk4cYwld5F1CJGk2gx+prRyUq8GRfvcVLq5niYWSozZdX73a2wIr1o9l/g==
|
||||
simplebar@^5.0.7:
|
||||
version "5.0.7"
|
||||
resolved "https://registry.yarnpkg.com/simplebar/-/simplebar-5.0.7.tgz#9c35a944a7abff1a3c4b6bc5dfb53997dc9b14ed"
|
||||
integrity sha512-Bp/s94+3hHBXkhi8VBkuXiNHePMGLDVjMwUEJckC3uIBwLUmJbYnT6jqoETal46l+zXbEklffLRr/TtsQwjw0A==
|
||||
dependencies:
|
||||
can-use-dom "^0.1.0"
|
||||
core-js "^3.0.1"
|
||||
|
||||
Reference in New Issue
Block a user