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

Exception adding a link #3

Closed
brunobg opened this issue Nov 25, 2013 · 7 comments
Closed

Exception adding a link #3

brunobg opened this issue Nov 25, 2013 · 7 comments
Labels

Comments

@brunobg
Copy link

brunobg commented Nov 25, 2013

I'm getting a

NS_ERROR_DOM_NOT_OBJECT_ERR: Parameter is not an object
caretPlaceholder.parentNode.removeChild(caretPlaceholder);
wysihtml5x-0.0.0-beta2.js (line 4446)

whenever I try to add a link. I'm using wysihtml5x-advanced.js (unchanged). In fact, I get the same error at the demo http://edicy.github.io/wysihtml5/examples/advanced.html

NS_ERROR_DOM_NOT_OBJECT_ERR: Parameter is not an object

var node = this.createContainer(range.endContainer.ownerDocument);

wysiht...eta1.js (line 5041)

This happens on FF17.0.8. Any ideas why? Could it be related to this one: jhollingworth/bootstrap-wysihtml5#138

@brunobg
Copy link
Author

brunobg commented Nov 25, 2013

Full stack trace right at the exception

executeAndRestore(method=function(), restoreScrollPosition=true)wysiht...eta2.js (line 4446)
exec(composer=Object { parent={...}, element=body.loh_required, config={...}, more...}, command=undefined, tagName="A", className="_wysihtml5-temp-1385418194749", classRegExp=RegExp /non-matching-class/g, cssStyle=undefined, styleRegExp=undefined, dontRestoreSelect=undefined)wysiht...eta2.js (line 6109)
_format(composer=Object { parent={...}, element=body.loh_required, config={...}, more...}, attributes=Object { href="http://ertsert"})wysiht...eta2.js (line 5534)
exec(composer=Object { parent={...}, element=body.loh_required, config={...}, more...}, command="createLink", value=Object { href="http://ertsert"})wysiht...eta2.js (line 5585)
exec(command="createLink", value=Object { href="http://ertsert"})wysiht...eta2.js (line 5426)
_execCommand(command="createLink", commandValue=Object { href="http://ertsert"})wysiht...eta2.js (line 8406)
(?)(attributes=Object { href="http://ertsert"})wysiht...eta2.js (line 8368)
fire(eventName="save", payload=Object { href="http://ertsert"})wysiht...eta2.js (line 762)
callbackWrapper(event=click clientX=503, clientY=113)wysiht...eta2.js (line 8040)
delegate(event=click clientX=503, clientY=113)wysiht...eta2.js (line 1291)

Relevant variable at the exception:

>>> caretPlaceholder
NodeList[span._wysihtml5-temp-placeholder]
>>> caretPlaceholder.parentNode
undefined

but just commenting line 4446 does not solve the issue, I still get the same error at 2731.

@brunobg
Copy link
Author

brunobg commented Nov 25, 2013

And I tried this.editor.currentView.element.focus(); at line 5425 (right before the method.apply()) but it made no difference at all. There is a call to this.editor.focus() at 8404, anyway... So I got nowhere. Any ideas?

@priithaamer
Copy link

Hi, can you reproduce it on newer browsers? FF17 is fairly old and we have no aim to support it.

@brunobg
Copy link
Author

brunobg commented Nov 26, 2013

FF17 is the current ESR browser, but I also get it in Chrome: Uncaught Error: NotFoundError: DOM Exception 8

@brunobg
Copy link
Author

brunobg commented Nov 26, 2013

Also, it does not happen with xing's wysihtml5-0.4.0pre.js.

@pulges
Copy link
Contributor

pulges commented Dec 10, 2013

Found and fixed the error.
Problem was that cleaning up after executing commands cleaned up temporary class needed for link insertion.

8a2693b
a21df76

@pulges pulges closed this as completed Dec 10, 2013
@brunobg
Copy link
Author

brunobg commented Dec 11, 2013

Great, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants