-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New tab via Ctrl-T when focusing non-last tab can have inconsistent insertion position #1481
Comments
I think this is caused by the reason I wrote at #1038 (comment). If a new tab with loaded "about:newtab" page is opened and you try to open another new tab, then there is no "prepared about:newtab tab" and it is opened with the URI "about:blank". On the other hand, TST detects "new tabs opened by Ctrl-T" based on tab's URI. As the result, TST couldn't detect the secondary opened tab as a tab from Ctrl-T. |
If my description at #1481 (comment) is true, you'll get expected result with enough delay, like: "Ctrl-T to open tab, close the new tab, wait 5 seconds, and Ctrl-T again." |
I still reproduce this reliably on the latest nightly, even waiting 10 seconds between every step. I've also reproduced this on the following test cases: Case III
Expected result
Actual resultFor the first and every odd "iteration", the correct behavior:
For the second and every even "iteration", always appears as an independent tab:
Case IV
Expected result
Actual resultFor the first and every odd "iteration", the correct behavior:
For the second and every even "iteration", always appears as an independent tab:
I've also found that similar behavior occurs when TST new blank tab setting is set to "a sibling of the current tab". So, it's really when the "non-last tab" is focused before Ctrl-T, rather than "non-last child tab". |
This is still reproducing reliably for me on the latest TST nightly on Firefox Developer Edition 57.0b14 x64. I don't think this is a Firefox bug. |
I can reproduce this on FF Developer 58.0b1 on Mac. Also for example in case III, it's not necessary to close any tab. Just keep selecting tab A and making a new tab, it alternates between child and independent. Waiting in between doesn't help. I also agree #1481 (comment) isn't correct, and it's not that Firefox bug. |
Case III seems to be fixed for me by recent commits. On the other hand, on the Case IV, success case actually reports the new tab's url is about:newtab and failure case reports the new tab is about:blank... |
After researching, I've realized that this event handler https://dxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#7198 does not executed on failure case. Because TST moves a newly opened tab from the end of the tab bar to next to the current, CSS transition of |
Case III also seems fixed for me with new TST nightly. How do you see the tab's url? If I set "Guess a new tab as opened... about:blank", then in case III, I can create child tabs by pressing new tab key very quickly. But if I set that in case IV, next sibling tabs are not alternately created, so I think it must not be that it alternately gets "about:blank" as url. |
Due to the reason I told at #1481 (comment) Firefox failed to prepare preloaded browser for about:newtab. By recent commits, now TST never move Firefox's tabs until their opening animation is finished, so I think most problems around new tab with about:newtab are fixed. |
Required changes are very large 4b89bfd so I think there are some regressions. |
@piroor you're right about regressions, I've just updated to 5569 and come across the fallout: order of tabs and tree structure are messed up again after session restore. I'll try to find new STR. Also, as it turned out, the amount of time required to expand or collapse the stack depends on the number of tabs in a window. On my config it takes around 5 seconds to collapse/expand the stack with 5 child tabs in a window with 300 unloaded tabs. I'll try to find STR as well. It will be hard, though. |
Filed a bug about fallout from this commit: #1513 |
OK, I've reverted the large commit and reintroduce small changes only for this issue. I think the commit should resolve this issue but there is another visual problem from slow operation. |
Confirming this is fixed for me, thanks. |
Short description
New tab via Ctrl-T when focusing non-last child tab can have inconsistent insertion position, specifically when the TST new blank tab setting is set to either "child of the current tab" or "next sibling of the current tab".
Steps to reproduce
Case I
Case II
Expected result
Case I
Case II
Actual result
Case I
For the first and every odd "iteration", the correct behavior:
For the second and every even "iteration", always appears as an independent tab:
Case II
For the first and every odd "iteration", the correct behavior:
For the second and every even "iteration", always appears as an independent tab:
Environment
The text was updated successfully, but these errors were encountered: