Opened 14 years ago
Last modified 13 years ago
#7227 confirmed Bug
Dialog: showPage increments pageCount even if page is already showing
Reported by: | sadlerjw | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Dialogs | Version: | 3.0 |
Keywords: | HasPatch | Cc: |
Description
In the Dialog plugin, callling showPage on a page that is already visible increments the pageCount, meaning that when all but one page are removed, the tab bar will still be visible. To reproduce:
- Create and show a dialog with two pages; both shown by default. Let's call them page1 and page2.
- Call showPage( 'page2' )
- Call hidePage( 'page1' )
Now only page2 will be visible - but the tab bar will still be showing, with the single tab "page2". Intended behaviour (presumably) is to have tab bar disappear when only one page is visible.
This can be fixed by adding a check to tab.isVisible() in showPage.
Proposed patch included.
Attachments (2)
Change History (4)
Changed 14 years ago by
Attachment: | 7227.patch added |
---|
comment:1 Changed 14 years ago by
Keywords: | HasPatch added |
---|
comment:2 Changed 13 years ago by
Status: | new → confirmed |
---|---|
Version: | 3.5.1 → 3.0 |
Reproducible from CKE 3.0
- Add this code to editor definition in replacebycode sample
{ extraPlugins : 'mybutton', toolbar : [[ 'mybutton' ]] }
- Add plugin from attached file
- Open dialog
The initial number of tabs is 2. After calling showPage, hidePage only one tab is visible but pageCount is 2 and thus tab is still visible.
Changed 13 years ago by
Attachment: | mybutton.zip added |
---|
Proposed patch