Topic title duplicated in header


(Joshua Rosenfeld) #1

I’ve started noticing this about a week or so ago. I’ve yet to get a consistent repro - but it seems to occur after editing a topic (as TL3 here on Meta, or Moderator at Stonehearth).

Here’s what I’ve been seeing:

On a topic that can scroll, moving down (go to a later post) then back up resolves it. On a topic without scroll, I have to refresh the page to resolve it.

Has anyone else seen this?

Edit: just made a ninja edit to fix a typo, got the bug in this very topic!

Edit 2: And it happened again after the edit to add the image. Perhaps repro is being scrolled to topic of topic when making an edit…


(Jeff Atwood) #2

What is the exact repro? I am not clear.


(Joshua Rosenfeld) #3

I’m still not sure this is 100% reproducible - haven’t had time to attempt repro in my dev instance.

Here’s what I think is the repro:

  1. Create a topic (or have permissions to edit topics).
  2. Open the topic editor.
  3. Scroll the topic view behind the editor to the very top.
  4. Make and edit and save.
  5. See the “duplciated” title

(Joe Buhlig) #4

I just tried this on my dev setup.

  1. Open existing topic
  2. Click the pencil to edit the original post.
  3. Scroll down to bottom of topic.
  4. Scroll up to top of the topic.
  5. Save edit.
  6. See double title

(Sam Saffron) #5

@eviltrout can you have a look at this?


(Sam Saffron) #7

Another simple repro on local

  • Open 2 tabs looking at same topic, be scrolled to top.
  • Edit title in one tab
  • Go to second tab and header re-rendered with this bug

So messagebus is telling page to re-render header (correctly) but the check of what state it should be is somehow omitted.


(Ionuț Staicu) #8

An easy reproduction is here:

(opened another thread because i didnt knew about this one)


Double title now (without edit)
(Bianca) #9

Hello,

I just fixed this and submitted a pull request.

EDIT: To explain a little bit how I tracked the bug:

  1. I tried reproducing and found out that it actually reproduces by changing a topic’s title.
  2. I found out that there are two events that control the header and if the topic title is shown or not: header:show-topic and header:hide-topic.
  3. Searched where header:show-topic is triggered and found a match when a topic is reloaded (which happens when a topic is edited).
  4. I changed the code to trigger header:show-topic only if the the topic title is not visible (not the one from the header, but the proper one, #topic-title).

(Robin Ward) #10

Thanks, looks like @sam merged it recently :slight_smile:


(Robin Ward) #11