Opened 15 years ago
Closed 15 years ago
#5307 closed Bug (fixed)
Customizing multi-tab dialog to show only one tab doesn't work
Reported by: | Damian | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.3 |
Component: | UI : Dialogs | Version: | 3.0 |
Keywords: | IBM Confirmed Review+ | Cc: | Joek |
Description (last modified by )
Take the Find dialog as an example. Customize it by hiding the Replace tab and leaving only the Replace tab visible:
replaceTab.hidden=true; dialogDefinition.dialog.parts.dialog.addClass('cke_single_page');
This results in a single Find tab appearing in the dialog, but the tab can be accessed with keyboard and when navigating using arrows, an error occurs and the content of the dialog becomes blank.
Attachments (2)
Change History (9)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Component: | General → UI : Dialogs |
---|---|
Description: | modified (diff) |
Keywords: | Confirmed added |
Owner: | set to Garry Yao |
Status: | new → assigned |
Version: | → 3.0 |
Changed 15 years ago by
Attachment: | 5307.patch added |
---|
comment:3 Changed 15 years ago by
Keywords: | Review? added |
---|
comment:4 Changed 15 years ago by
Keywords: | Review- added; Review? removed |
---|
I think that the changes of the patch are good, but don't fully address this problem. Even testing the about dialog http://ckeditor.com/demo it's possible to get a js error.
- Open the dialog
- Press Alt+F10 twice
- Press Tab -> "O is undefined" (fails in selectPage with null as the id)
So we need to avoid any try to focus the tabs if there's only one. Then this patch will help to recognize the situation for modified dialogs.
I think that the final touch for this patch would be to verify that when hidePage and showPage are called, the 'cke_single_page' class is applied automatically (and whatever else to make it behave as a multitab/no-tabs dialog). That way people can manage the tabs properly through the API without caring about this internal details.
Changed 15 years ago by
Attachment: | 5307_2.patch added |
---|
comment:5 Changed 15 years ago by
Keywords: | Review? added; Review- removed |
---|
With the above comments revised.
comment:6 Changed 15 years ago by
Keywords: | Review+ added; Review? removed |
---|
I neglected to mention that I do not want to completely remove the Replace tab, i.e.