mirror of https://github.com/zulip/zulip.git
Fix wrong pointer position on narrow
This was introduced in a71867c2435790, intended to fix #1287. Very subtle bug. The problem was that we were attaching a click handler to two selectors, a link, and a div that the link is inside of. Since the link was a descendant of the other selector, clicking the link created TWO click events, and the second click on a stream box while already narrowed to that stream jumped you to the end. We should be careful of this in the future — never attach an event handler to two selectors, one of which is contained in the other. (imported from commit f428f593280e80c90b2665d1dfbff1df8a39bd35)
This commit is contained in:
parent
0f42feb131
commit
950d271bc3
|
@ -1199,7 +1199,7 @@ $(function () {
|
|||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('#stream_filters li').on('click', 'a.subscription_name, .subscription_block', function (e) {
|
||||
$('#stream_filters li').on('click', '.subscription_block', function (e) {
|
||||
if (exports.home_tab_obscured()) {
|
||||
ui.change_tab_to('#home');
|
||||
}
|
||||
|
@ -1211,7 +1211,7 @@ $(function () {
|
|||
|
||||
popovers.register_click_handlers();
|
||||
|
||||
$('#stream_filters').on('click', '.expanded_subject a, .subject_box', function (e) {
|
||||
$('#stream_filters').on('click', '.subject_box', function (e) {
|
||||
if (exports.home_tab_obscured()) {
|
||||
ui.change_tab_to('#home');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue