Opened 13 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:


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:

  1. Create and show a dialog with two pages; both shown by default. Let's call them page1 and page2.
  2. Call showPage( 'page2' )
  3. 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)

7227.patch (439 bytes) - added by sadlerjw 13 years ago.
Proposed patch (3.3 KB) - added by Jakub Ś 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by sadlerjw

Attachment: 7227.patch added

Proposed patch

comment:1 Changed 13 years ago by Sa'ar Zac Elias

Keywords: HasPatch added

comment:2 Changed 13 years ago by Jakub Ś

Status: newconfirmed

Reproducible from CKE 3.0

  1. Add this code to editor definition in replacebycode sample
    	extraPlugins : 'mybutton',
    	toolbar : [[ 'mybutton' ]]
  2. Add plugin from attached file
  3. 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 Jakub Ś

Attachment: added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy