Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issue 10 in ep_tables #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

DanBeard
Copy link

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