Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6825 closed bug (notabug)

Setting a property that has only a getter error

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


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

setting a property that has only a getter += targetHeight;

which happens here:

if ([1] === "bottom" ) {

!! += targetHeight;

} else if ([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.

Change History (5)

comment:1 Changed 11 years ago by Giovanni Giacobbi

component: ui.position

comment:2 Changed 11 years ago by Scott González

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().

comment:3 Changed 11 years ago by be.davestein

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.

comment:4 Changed 11 years ago by be.davestein

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.

comment:5 Changed 11 years ago by Scott González

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

Note: See TracTickets for help on using tickets.