Opened 8 years ago
Closed 7 years ago
#4048 closed Bug (fixed)
Context submenu lacks uiColor
| Reported by: | tobiasz.cudnik | Owned by: | tobiasz.cudnik |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.1 |
| Component: | General | Version: | |
| Keywords: | Kama Confirmed Review+ | Cc: |
Description
Context submenu lacks uiColor in Kama skin.
Attachments (3)
Change History (13)
comment:1 Changed 8 years ago by tobiasz.cudnik
- Owner set to tobiasz.cudnik
- Status changed from new to assigned
Changed 8 years ago by tobiasz.cudnik
comment:2 Changed 8 years ago by tobiasz.cudnik
- Keywords Review? added
comment:3 Changed 8 years ago by fredck
- Keywords Review- added; Review? removed
- Milestone changed from CKEditor 3.0 to CKEditor 3.1
comment:4 Changed 8 years ago by arczi
It is possible to change context menu UI color only once.
comment:5 Changed 8 years ago by tobiasz.cudnik
@Frederico: It's not fully possible to move menu-related code to menu plugin, because CSS is skin-dependent, so it will have to stay inside skin files. Although keeping references inside menu objects and listening for an uiColorChanged event may be a good solution.
@Artur: It's a know issue (there is a ticket somewhere i think). That's because missing reference to style element at some point. It needs deeper investigation.
Changed 7 years ago by tobiasz.cudnik
comment:6 Changed 7 years ago by tobiasz.cudnik
- Keywords Review? added; Review- removed
Second patch changes relation with menu plugin to be event based, which resolves both submenu and sequential uiColor changes issues (mentioned by Artur). Also code is now more general purpose and can manage ui color more easily in any iframe document.
comment:7 follow-up: ↓ 8 Changed 7 years ago by garry.yao
- Keywords Review- added; Review? removed
The patch works for me in all browsers, while there're some issues noticed in codes:
- L160 - L170 of skin.js could be merged into 'updateStylesheets' function;
- It's better to use RegExp for global replacement;
- L176 - L192 should be merged within the guard condition at L195.
Changed 7 years ago by tobiasz.cudnik
comment:8 in reply to: ↑ 7 Changed 7 years ago by tobiasz.cudnik
- Keywords Review? added; Review- removed
Replying to garry.yao:
The patch works for me in all browsers, while there're some issues noticed in codes:
- L160 - L170 of skin.js could be merged into 'updateStylesheets' function;
- It's better to use RegExp for global replacement;
- L176 - L192 should be merged within the guard condition at L195.
1 and 2 are fixed.
Although 3 is incorrect, because UI color functionality should be available independently from having a uiColor setting in a config. It can be set using editor.setUiColor() in any moment and we shouldn't block it.
comment:9 Changed 7 years ago by garry.yao
- Keywords Review+ added; Review? removed
comment:10 Changed 7 years ago by tobiasz.cudnik
- Resolution set to fixed
- Status changed from assigned to closed
Fixed with [4180].

These changes are a bit risky at this point. Let's delay it a bit.
In any case, i think we should find a solution where the other plugins can listen for the uiColor changes somehow, adapting themselves to the changes. In this way the menu plugin would have menu specific code for it, instead of having it in the skin files.