Skip to content

Fix for Issue 10 in ep_tables - #16

Open
DanBeard wants to merge 1 commit into
gedion:masterfrom
DanBeard:master
Open

Fix for Issue 10 in ep_tables#16
DanBeard wants to merge 1 commit into
gedion:masterfrom
DanBeard:master

Conversation

@DanBeard

Copy link
Copy Markdown

Fix for Issue #10

In some cases (like when looking at the time slider) it turns out what etherpad says is a node, actually is just a normal javascript object with innerhtml defined.
Trying to call DOM functions on this node will reveal it for the phony that it is, and it will throw an exception.

This fix disables the tables functionality in the timeslider perspective, but at least it's still usable.
I couldn't find an elegant cross-browser solution to checking if an object was really a DOM node or not, so I just check to see if it has a tagName. DOM nodes do, and fake dictionaries don't .

We should start a discussion over at etherpad, they should update their documentation with a warning that acePostWriteDomLineHTML might not always be given an actual DOM node.

In some cases (like when looking at the time slider) it turns out what etherpad says is a node, actually is just a normal javascript object with innerhtml defined.
Trying to call DOM functions on this node will reveal it for the phony that it is, and it will throw an exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant