Exception thrown when adding event handlers to buttons inside <paper-dialog> element #296
Comments
<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd Added Pkg-Polymer, Area-Pkg, Triaged labels. |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 Set owner to @jakemac53. |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 I was unable to get a repro on this by creating an element with the example template and functions, would it be possible for you to post a full project that contains the repro? Added NeedsInfo label. |
This comment was originally written by pruj...@gmail.com The project where this is occurring is currently closed source. It's really odd, because the event handler method on the buttons is called just fine, but the above exception displays every time. When I remove the event handlers from the element, clicking the buttons doesn't give the error. Sorry, wish I could help more. I've attached the Polymer element in question, along with it's code-behind file. Perhaps that may be of some use. Attachment: |
This comment was originally written by prujoh...@gmail.com Removed an unneeded reference in the polymer file. Attachment: |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 Ah perfect, the actual issue is with the layered="true" attribute on the dialog. This rips out the shadow root from your element and puts it inside a different core-overlay-layer element which it then tries to call the method on (and fails because not only does it not exist but that is not a dart element). I will do some more investigation and see if this is a bug on the JS side of things as well, or something dart-specific. Added Started label. |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 Removed Priority-Unassigned label. |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 Definitely looks to be a dart issue, can't get a repro on the js side alone |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 Fix pending https://codereview.chromium.org/582113002/ |
This comment was originally written by pruj...@gmail.com Thanks for the quick resolution! |
<img src="https://avatars.githubusercontent.com/u/984921?v=3" align="left" width="48" height="48"hspace="10"> Comment by jakemac53 No problem, thanks for the bug report! Fixed in dart-lang/sdk@8c422a0 and released as 0.14.2+1. Added Fixed label. |
This comment was originally written by pr...@gmail.com Confirmed 0.14.2+1 fixes my issue. |
Originally opened as dart-lang/sdk#20931
This issue was originally filed by pru...@gmail.com
What steps will reproduce the problem?
Example shown here on SO: http://stackoverflow.com/questions/25800082/how-to-know-which-button-the-user-selected-on-paper-dialog
What is the expected output? What do you see instead?
I would expect this to work with no exceptions thrown, but after I click a button to close the dialog, I get:
Uncaught Uncaught Error: Bad state: controller overlay-host is not a Dart polymer-element.
Stack Trace:
Bad state: controller overlay-host is not a Dart polymer-element.
at dart.wrapException (http://192.168.1.68:8081/index.html_bootstrap.dart.js:2588:15)
at PolymerEventBindings_getEventHandler_closure.call$1 (http://192.168.1.68:8081/index.html_bootstrap.dart.js:24435:17)
at _RootZone.runUnaryGuarded$2 (http://192.168.1.68:8081/index.html_bootstrap.dart.js:9865:18)
at _RootZone_bindUnaryCallback_closure.call$1 (http://192.168.1.68:8081/index.html_bootstrap.dart.js:9986:26)
at PolymerEventBindings_prepareEventBinding__closure.call$2 (http://192.168.1.68:8081/index.html_bootstrap.dart.js:24456:34)
at dart.Primitives_applyFunction (http://192.168.1.68:8081/index.html_bootstrap.dart.js:2572:23)
at _callDartFunction (http://192.168.1.68:8081/index.html_bootstrap.dart.js:18147:29)
at paper-button.<anonymous> (http://192.168.1.68:8081/index.html_bootstrap.dart.js:18136:16)
What version of the product are you using?
Dart 1.6.0, Polymer 0.13.0.+3
On what operating system?
Windows 8 64-bit
What browser (if applicable)?
Chrome
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: