mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 23:48:45 +08:00
9c0e50e1cc
This fixes the problem reported in https://meta.discourse.org/t/custom-status-message-in-front-of-by-header-on-scroll/273320. This problem can be reproduced with any tooltip created using the DTooltip component or the createDTooltip function. The problem happens because the trigger for tooltip on mobile is click, and for tooltip to disappear the user has to click outside the tooltip. This is the default behavior of tippy.js – the library we use under the hood. Note that this PR fixes the problem in topics, but not in chat. I'm going to investigate and address it in chat in a following PR. To fix it for tooltips created with the createDTooltip function, I had to make a refactoring. We had a somewhat not ideal solution there, we were leaking an implementation detail by passing tippy instances to calling sides, so they could then destroy them. With this fix, I would have to make it more complex, because now we need to also remove onScrool handlers, and I would need to leak this implementation detail too. So, I firstly refactored the current solution in 5a4af05 and then added onScroll handlers in fb4aabe. When refactoring this, I was running locally some temporarily skipped flaky tests. Turned out they got a bit outdated, so I fixed them. Note that I'm not unskipping them in this commit, we'll address them separately later. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |