#13482 closed Bug (invalid)
Error trying to use font and size dropdown after removing and appending toolbar to node
Reported by: | Mike Kuenzi | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: | kuenzim@… |
Description
==Summary==
I get this error in Chrome:
Cannot read property 'data-cke-expando' of undefined
Which comes from line 212 of domobject.js
I get a different error in IE/Firefox
Unable to get property 'getName' of undefined or null reference
In element.js line 1378
==Steps to reproduce==
Using attached sample, follow these steps:
- Click Show Editing Tools
- Make a selection
- Change the font size and font of your selection.
- Click Hide Editing Tools
- Click Show Editing Tools
- Try to open Font or Size drop down, error will occur here
Other information
I had this same issue with the nightly build.
Attachments (1)
Change History (8)
Changed 9 years ago by
comment:1 Changed 9 years ago by
Cc: | kuenzim@… added |
---|
comment:2 Changed 9 years ago by
Summary: | Error trying to change use font and size dropdown after removing and appending toolbar to node → Error trying to use font and size dropdown after removing and appending toolbar to node |
---|
comment:3 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 Changed 9 years ago by
PS. I don't understand why you clone the toolbar. Can't you just show and hide it?
comment:5 Changed 9 years ago by
I agree with @Reinmar - why not just showing and hiding the toolbar?
When debugging the exception I have noticed that code (in method which throws error) current = current.getParent();
returns null at certain point for the toolbar element.
It looks a little bit like this element is detached from DOM (has no parent) what ,kind of matches what was written about cloneNode method - https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode.
Perhaps it would be best to change the approach?
comment:6 Changed 9 years ago by
I guess I was trying to build an approach where I could change the location of the toolbar. I suppose moving it around wouldn't cause this issue perhaps?
Basically depending on what you are editing I show different sets of tools. I'm using Knockout to show a series of Tabs, and those tabs may vary depending on what is being edited
Would it ever make sense to allow CKEDITOR to initialize it's toolbar in a specified place using a method? Maybe it doesn't, it's just a thought.
Thanks for the prompt response
comment:7 Changed 9 years ago by
You may find this helpful - http://sdk.ckeditor.com/samples/sharedspace.html.
Moving it around, hiding, showing - all should be safe.
I'm sorry, but cloning a toolbar is not a valid usage. Those nodes in the initial toolbar have the whole application bound to them. When cloning a toolbar you may break it.