PolymerElements / iron-fit-behavior

Fits an element into another element
17 stars 34 forks source link

Calling center() throws exception #57

Closed valdrinkoshi closed 8 years ago

valdrinkoshi commented 8 years ago

From @StokeMasterJack on April 28, 2016 19:19

this.$.dropdown.center(); Causes this exception: iron-fit-behavior.html:242 Uncaught TypeError: Cannot read property 'positionedBy' of undefined

Here is a screenshot of the stacktrace: 004

I am on Chrome Version 50.0.2661.86 (64-bit) Mac OS X Version 10.11.4 (15E65)

I was using Polymer 1.2 tried updating to Polymer/polymer#^1.4.0". Still same problem.

Copied from original issue: PolymerElements/iron-dropdown#77

valdrinkoshi commented 8 years ago

From @StokeMasterJack on April 28, 2016 19:20

I am using PolymerElements/iron-dropdown#~1.3.0

valdrinkoshi commented 8 years ago

Hi @StokeMasterJack, could you provide a jsbin exposing the issue? I cannot reproduce it http://jsbin.com/capuvu/1/edit?html,console,output

valdrinkoshi commented 8 years ago

From @StokeMasterJack on July 7, 2016 16:6

I am not sure how to do jsbin when there are imported html files. I have trimmed the example down to the bare minimum of two html files. I have a attached a zip file containing the two html files plus the bower_components folder. The two html files are inside the components/tmp-picker folder.

bug-demo.zip

valdrinkoshi commented 8 years ago

I see you're using paper-dialog and not iron-dropdown, so this is the wrong repo where to report it :) You don't need to call center() right after open(), because iron-overlay-behavior will call it when is the right moment http://jsbin.com/capuvu/2/edit?html,console,output Anyways, this seems to be a bug on iron-fit-behavior which crashes if you call center() for the first time: http://jsbin.com/juzaboz/1/edit?html,console,output

Will move the issue there