bwinton / TabCenter

Firefox add-on for arranging tabs vertically
https://testpilot.firefox.com/experiments/tab-center
210 stars 55 forks source link

Rearranging tab removes the URI text from it #475

Closed Keith94 closed 8 years ago

Keith94 commented 8 years ago

giphy

bwinton commented 8 years ago

@Manishearth: I think this might be related to your patch… Can you take a look at what's happening here?

Manishearth commented 8 years ago

Won't have time till monday, but yes 😄

Manishearth commented 8 years ago

At a quick glance -- we added an updateURI call where it initially didn't exist (https://github.com/bwinton/TabCenter/pull/467/files#diff-d8933c1a1ae4976d98ba20545c5f0b36R616). Perhaps we should only have it update the label if nonempty?

bwinton commented 8 years ago

Yeah, that might work…

Manishearth commented 8 years ago

Turns out that updateURI doesn't get called when the tab is moved, so this seems to be caused by some other change?

bwinton commented 8 years ago

So, given what you said, I now suspect the problem is that we're moving around a XUL element, but not re-calling the updateURI method, so our custom URI gets deleted by the XUL movement, and not re-added.

Manishearth commented 8 years ago

Why would we need to re-call on moving an element? Don't elements keep their contents when moved?

bwinton commented 8 years ago

It looks like no… 😕 (I'm guessing that the main element is preserved, but all the anonymous content it contains gets re-generated. Which leads me to wonder if we should set the address on the tab, and have it filter down into the address-label…)