Side navigation
#12505 closed bug (duplicate)
Opened September 11, 2012 01:37AM UTC
Closed September 11, 2012 01:58AM UTC
Last modified September 11, 2012 05:42AM UTC
replaceWith in google chrome giving error
Reported by: | sksallaj@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Okay, I didn't know if I should go to a google chrome forum or to this forum and report the bug but only seemed to happen on a chrome browser, but a minor issue with firefox.
Originally I posted a design issue in stackover flow found here:
I was having a problem that was on a larger scale happening on the project, so I figured I'd replicate it again to see if it does the same thing, and it does.
I was able to trim down the code into something I was able to replicate.
Here are the results:
In IE 7,8, and 9, the code worked perfectly
In google chrome:
I got an: Uncaught Error: NOT_FOUND_ERR: DOM Exception 8
It took me to the code in jquery:
"
keepData is for internal use only--do not document
remove: function( selector, keepData ) {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
if ( !keepData && elem.nodeType === 1 ) {
jQuery.cleanData( elem.getElementsByTagName("*") );
jQuery.cleanData( [ elem ] );
}
if ( elem.parentNode ) {
Uncaught Error: NOT_FOUND_ERR: DOM Exception 8 elem.parentNode.removeChild( elem );
}
}
}
"
In firefox:
It worked, but I couldn't override the tab functionality, as I tried using e.preventDefault. I kept losing focus of the web document as it was being focused on other fields belonging to the browser. If I switched the keycode to a carriage return keycode == 13, it would work.
Attachments (0)
Change History (2)
Changed September 11, 2012 01:58AM UTC by comment:1
resolution: | → duplicate |
---|---|
status: | new → closed |
Changed September 11, 2012 05:42AM UTC by comment:2
Ah thanks, I'll post a notice to chrome's developer forum.
The work around for now was to wrap the spans within another span
so:
<span id="test1" class="test">Test1</span>
would be:
<span id="parent_test1"><span id="test1" class="test">Test1</span></span>
Then I used jquery to do this:
$("#edit_"+cellInfo.cID).parent().empty();
$("#parent_"+cellInfo.cID).append(cellElem.old_elem.context.outerHTML);
That allowed me to do the same thing and get to where I wanted.
Duplicate of #11663.Repro with some problems fixed, like duplicate ID values:
http://jsfiddle.net/QcGag/5/
It's not something we can fix, Chrome should not be throwing this. All we could do is catch it but wrapping that with a try/catch is a pretty ugly solution.