mirror of https://github.com/zulip/zulip.git
Use DOM ids in get_zephyr
This greatly reduces lag on mouseover selection. (imported from commit 7d9bc0ebce2aa9781c316033d3e9d21e9da6ee3f)
This commit is contained in:
parent
1dabe1cf81
commit
fbec2b8d76
|
@ -256,10 +256,8 @@ function get_id(zephyr_row) {
|
|||
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) {
|
||||
return $("table.focused_table [zid=" + zephyr_id + "]");
|
||||
return $('#' + (narrowed ? 'zfilt' : 'zhome') + zephyr_id);
|
||||
}
|
||||
|
||||
function scroll_to_selected() {
|
||||
|
|
Loading…
Reference in New Issue