mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Fix clicking on link to message when sending outside this narrow
(imported from commit 6eeeb3b4c06021be21f48c8c5f2869904cd13b09)
This commit is contained in:
@@ -461,6 +461,21 @@ $(function () {
|
||||
if (typeof(bridge) !== 'undefined' && window.bridge === undefined) {
|
||||
window.bridge = bridge;
|
||||
}
|
||||
|
||||
$(document).on('message_id_changed', function (event) {
|
||||
var old_id = event.old_id, new_id = event.new_id;
|
||||
|
||||
// If a message ID that we're currently storing (as a link) has changed,
|
||||
// update that link as well
|
||||
_.each($('#out-of-view-notification a'), function (e) {
|
||||
var elem = $(e);
|
||||
var msgid = elem.data('msgid');
|
||||
|
||||
if (msgid === old_id) {
|
||||
elem.data('msgid', new_id);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
exports.register_click_handlers = function () {
|
||||
|
||||
Reference in New Issue
Block a user