Skip to main content

Search and Top Navigation

#6825 closed bug (notabug)

Opened January 08, 2011 05:41PM UTC

Closed January 08, 2011 08:24PM UTC

Last modified January 25, 2011 07:35PM UTC

Setting a property that has only a getter error

Reported by: thg2k Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.core Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:
Description

I get the following error message using JQueryUI plugin fnagel/ui.selectmenu:

setting a property that has only a getter

basePosition.top += targetHeight;

which happens here:

if ( options.at[1] === "bottom" ) {

!! basePosition.top += targetHeight;

} else if ( options.at[1] === center ) {

I inspected using firebug and basePosition appears to be an object of type ClientRect()

Any clue about what the problem could be? I cannot easily give you access to the whole site for reproducing the error, but i don't think it's fault of the plugin that i'm using.

Attachments (0)
Change History (5)

Changed January 08, 2011 05:42PM UTC by thg2k comment:1

component: ui.position

Changed January 08, 2011 08:24PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

Selectmenu isn't an official jQuery UI plugin. Please create a new ticket if you can provide a reduced test case showing an error with a valid use of .position().

Changed January 25, 2011 06:54PM UTC by be.davestein comment:3

thg2k, I have been having the same problem and am currently trying to pin-point it. Essentially selectMenu is trying to run on some removed element, which magically ( can't figure out why yet ) gets a constructor when calling .offset() on it.

I just put this in selectMenu above this.list ( should be line 562, same place that will call .position )

console.log( this.newelement , this.newelement.offset() );

If you're having same issue as me, element should be greyed out in console and the offset should have the constructor.

Changed January 25, 2011 07:20PM UTC by be.davestein comment:4

Okay so two issues.. when selectmenu loads, it runs a settimeout and then refreshposition so it stands the chance to run on a removed element. Also if you remove an element it still has a bind to window fore refresh position. I just put some safeties in there to unbind when it can't find element.

Changed January 25, 2011 07:35PM UTC by scottgonzalez comment:5

Please do not carry on any further discussion inside this ticket.