ASSERTION: Unexpected document: 'capturingContent->GetCurrentDoc() == GetDocument()'

NEW
Unassigned

Status

()

7 years ago
7 years ago

People

(Reporter: mats, Unassigned)

Tracking

({assertion, reproducible, testcase})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
STEPS TO REPRODUCE
1. load layout/reftests/bugs/598726-1.html in a debug build
2. click on the text field

ACTUAL RESULT
###!!! ASSERTION: Unexpected document: 'capturingContent->GetCurrentDoc() == GetDocument()', file layout/base/nsPresShell.cpp, line 5884
###!!! ASSERTION: Unexpected document: 'capturingContent->GetCurrentDoc() == GetDocument()', file layout/base/nsPresShell.cpp, line 5947

Comment 1

7 years ago
I also see this assertion with the current ICHC sites; they do something with their comment form and the upshot is that the capturing content has been removed from the document by the time the assertion is checked.

Comment 2

7 years ago
So, here's the script they use:

<script type="text/javascript">
jQuery(document).ready(function(){
	// Expando Mode: start small, then auto-resize on focus + text length
	jQuery( '#comment-form-identity' ).hide();
	jQuery( '#comment-form-subscribe' ).hide();
	jQuery( '#commentform .form-submit' ).hide();
	jQuery( '#comment' ).css( { 'height':'10px' } ).focus( function() {
		jQuery( this ).animate( { 'height':'70px' } );
		jQuery( '#comment-form-identity' ).slideDown();
		jQuery( '#comment-form-subscribe' ).slideDown();
		jQuery( '#commentform .form-submit' ).slideDown();
	});
});
</script>

I've no idea why animating the height of the textarea to 70px would cause the anonymous content to be recreated but it does and this happens in between the capturing content getting set and it getting asserted.
You need to log in before you can comment on or make changes to this bug.