mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 06:58:31 +00:00
Use DOM ids in get_zephyr
This greatly reduces lag on mouseover selection. (imported from commit 7d9bc0ebce2aa9781c316033d3e9d21e9da6ee3f)
This commit is contained in:
@@ -256,10 +256,8 @@ function get_id(zephyr_row) {
|
|||||||
return zephyr_row.attr('zid');
|
return zephyr_row.attr('zid');
|
||||||
}
|
}
|
||||||
|
|
||||||
// NB: this is slow (50 ms or more) due to the custom attribute.
|
|
||||||
// We instead could compute an id based on the zid and focused table.
|
|
||||||
function get_zephyr(zephyr_id) {
|
function get_zephyr(zephyr_id) {
|
||||||
return $("table.focused_table [zid=" + zephyr_id + "]");
|
return $('#' + (narrowed ? 'zfilt' : 'zhome') + zephyr_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function scroll_to_selected() {
|
function scroll_to_selected() {
|
||||||
|
|||||||
Reference in New Issue
Block a user