mirror of https://github.com/zulip/zulip.git
8deb2fc9ef
In our toggler component (the thing that handles tabs in things like our markdown/search help, settings/org, etc.), we have a callback mechanism when you switch to the tab. We were being tricky and only calling it when the tab changed. It turns out it's better to just always call the callback, since these things are often in modals that open and close, and if you open a modal for the second time, you want to do the callback task for whichever setting you're going to. There was actually kind of a nasty bug with this, where the keyboard handling in the keyboard-help modal worked fine the first time you opened it, but then it didn't work the second time (if you focused some other element in the interim), and it was due to not re-setting the focus to the inner modal because we weren't calling the callback. Of course, there are pitfalls in calling the same callbacks twice, but our callbacks should generally be idempotent for other reasons. |
||
---|---|---|
.. | ||
casper_lib | ||
casper_tests | ||
node_tests | ||
zjsunit | ||
.eslintrc.json | ||
run-casper |