Skip to main content

Bug Tracker

Side navigation

#11276 closed bug (invalid)

Opened February 03, 2012 03:34PM UTC

Closed February 18, 2012 08:15AM UTC

Javascript loses context after .css() call

Reported by: Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

call this function:

function channelUserInput() {
	$("body").append("<div id='screen'></div>");

		'display' : 'block',
		opacity : 0.7,
		'width' : $(document).width(),
		'height' : $(document).height()

//This is the problematic line!
		'overflow' : 'hidden'

from otherFunction (see below) and if otherFunction receives as a parameter an object (in this case a Java object from an applet code) it will lose context and with it all knowledge of that parameter but not of other primitive type parameters :p


function otherFunction(myObject, aString) {
    myObject.something(); // works
    channelUserInput(); // works
    myObject.something(); // FAILS 
    //javascript just lost reference to myObject but not to aString
Attachments (0)
Change History (2)

Changed February 03, 2012 03:37PM UTC by rwaldron comment:1

owner: →
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!

Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate:

Open the link and click to "Fork" (in the top menu) to begin.

Changed February 18, 2012 08:15AM UTC by trac-o-bot comment:2

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!