Closed
Bug 629665
([regression])
Opened 13 years ago
Closed 13 years ago
Tab bar covers full screen
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: kbrosnan, Assigned: vingtetun)
References
Details
Attachments
(3 files, 2 obsolete files)
My tab bar expanded to cover all the screen. Mozilla/5.0 (Android; Linux armv7l; rv:2.0b11pre) Gecko/20110127 Firefox/4.0b11pre Fennec/4.0b5pre ID:20110127162904
Assignee | ||
Comment 1•13 years ago
|
||
This bug is a regression from bug 628732. I've done a mistake by substracting the height of the undo tab box. This patch fixes that and also fix some funny bugs encountered when adding tests, like: * the scroll position can be wrong when the undo tab is removed from the content and the sidebar is hidden * the scroll position can be wrong when a tab is closed (which is the reason for the new event, that fire _after_ the tab has been removed from the DOM)
Attachment #507893 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 2•13 years ago
|
||
hmm, I can probably move + event = document.createEvent("Events"); + event.initEvent("TabClosed", true, false); + window.dispatchEvent(event); before the this.selectedTab call!
Assignee | ||
Updated•13 years ago
|
Alias: [regression]
Updated•13 years ago
|
Priority: -- → P3
Assignee | ||
Comment 3•13 years ago
|
||
Mark, if you don't like the TabClosed event I can remove it from this patch and open an other bug for it.
Comment 4•13 years ago
|
||
Can we drop "TabClosed" and use "TabClose", but setTimeout(..., 0) in the event handler. That should allow the teardown of the Tab to complete and should act like a "TabClosed"
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to comment #4) > Can we drop "TabClosed" and use "TabClose", but setTimeout(..., 0) in the event > handler. That should allow the teardown of the Tab to complete and should act > like a "TabClosed" My problem the tab.chromeTab element (on which the event is dispatched) would be unexistent at this point :/ Another possibility is to rename the TabClose event TabWillClose and fired a new TabClosed event on the window? This is basically the same as what i already do in the patch except the name is closer to the truth.
Comment 6•13 years ago
|
||
I want "TabClose" to work like it does on desktop
Assignee | ||
Comment 7•13 years ago
|
||
This is not adding any new event. I'm just keeping a reference to the dom element to have it alive for the duration of the function.
Assignee: nobody → 21
Attachment #507893 -
Attachment is obsolete: true
Attachment #509380 -
Flags: review?(mark.finkle)
Attachment #507893 -
Flags: review?(mark.finkle)
Comment 8•13 years ago
|
||
Comment on attachment 509380 [details] [diff] [review] Patch v0.2 We are changing the way TabClose works here. The "browser" is now dead by the time TabClose is fired. The chromeTab is now removed from the document too. I'd worry that the event wouldn't even fire correctly, since the element is no longer in the DOM. I think this will break: http://mxr.mozilla.org/mobile-browser/source/components/SessionStore.js#212 which wants access to the "browser" Let me think a bit more about the previous idea of adding a "TabRemove" or something event.
Comment 9•13 years ago
|
||
Let's go with your first approach, but call the event "TabRemove"
Assignee | ||
Comment 10•13 years ago
|
||
(In reply to comment #9) > Let's go with your first approach, but call the event "TabRemove" Ok, I will update the patch during landing.
Assignee | ||
Comment 11•13 years ago
|
||
Before landing I'm re-asking review to be sure we agree on the solution.
Attachment #509380 -
Attachment is obsolete: true
Attachment #509474 -
Flags: review?(mark.finkle)
Attachment #509380 -
Flags: review?(mark.finkle)
Comment 14•13 years ago
|
||
Comment on attachment 509474 [details] [diff] [review] Patch v0.2 > Elements.tabs.addEventListener("TabSelect", this, true); > Elements.tabs.addEventListener("TabOpen", this, true); >+ window.addEventListener("TabRemove", this, true); I think we should fire the event on the chromeTab or the parent of the chrometab, so Elements.tabs.addEventListener should work for "TabRemove" too > event.initEvent("TabClose", true, false); > tab.chromeTab.dispatchEvent(event); > tab.browser.messageManager.sendAsyncMessage("Browser:TabClose"); > > tab.destroy(); > this._tabs.splice(tabIndex, 1); > > this.selectedTab = nextTab; >+ >+ event = document.createEvent("Events"); >+ event.initEvent("TabRemove", true, false); >+ window.dispatchEvent(event); Hold onto the chromeTab until the end of this function and fire the TabRemove event on it, or if that won't work, use the parent of the chromeTab. But let's not use the window. r+ with that change
Attachment #509474 -
Flags: review?(mark.finkle) → review+
Comment 15•13 years ago
|
||
for Mozilla /5.0 (Maemo;Linux armv7l;rv:2.0b12pre)Gecko/20110204 Firefox/4.0b12pre Fennec /4.0b5pre Build ID: 20110204004947, Platform: Linux-maemo, Operating System: Linux-arm having three tabs and closing one of them, will double the tab panel.
Assignee | ||
Comment 16•13 years ago
|
||
http://hg.mozilla.org/mobile-browser/rev/aa4eaa1f3916
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 17•13 years ago
|
||
Build Identifier: Mozilla/5.0 (Android; Linux armv7l; rv:2.0b8pre) Gecko/20101104 Firefox/4.0b8pre Fennec/4.0b3pre Device: HTC Desire The columns are not duplicated anymore, so I will set the bug to Verified Fixed
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•