paper-dialog not opening

168 views
Skip to first unread message

Fourty Love

unread,
Jan 17, 2016, 11:04:10 AM1/17/16
to Polymer
Hey,
I've pretty much copied the code for the plain dialog from this:
But eventhough the id's of the button and the dialog match it is not opening.
Do I need some kind of script to open it?
Thanks!

Eric Bidelman

unread,
Jan 17, 2016, 11:13:23 AM1/17/16
to Fourty Love, Polymer

Can you post a js bin? Did you import the element?


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/d6cd64b7-affa-4da2-bf95-bffd9d0548a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fourty Love

unread,
Jan 17, 2016, 11:23:03 AM1/17/16
to Polymer

I've imported a lot of elements and I'm using this code:
<paper-button data-dialog="dialog" role="button" tabindex="0" animated="" aria-disabled="false" elevation="0" class="x-scope paper-button-0">plain dialog<paper-ripple class="style-scope paper-button">


   <div id="background" class="style-scope paper-ripple" style="opacity: 0;"></div>
   <div id="waves" class="style-scope paper-ripple"></div>
 </paper-ripple></paper-button>

<paper-dialog id="dialog" role="dialog" tabindex="-1" aria-modal="false" class="x-scope paper-dialog-0" style="outline: none; position: fixed; box-sizing: border-box; z-index: 103; top: 49.5px; left: 0px; max-height: 455px; max-width: 280px;" aria-labelledby="paper-dialog-header-65">


      <h2 id="paper-dialog-header-65">Dialog Title</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

  </paper-dialog>

Eric Bidelman

unread,
Jan 17, 2016, 12:36:25 PM1/17/16
to Fourty Love, Polymer
Did you call open? https://elements.polymer-project.org/elements/paper-dialog#method-open

Alternatively, you can declare the element with the `opened` attribute and it will open on page load.

Follow Polymer on Google+: plus.google.com/107187849809354688692

---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.

Fourty Love

unread,
Jan 17, 2016, 5:05:17 PM1/17/16
to Polymer
Sorry I'm completely new to polymer. How would I call that?

Eric Bidelman

unread,
Jan 17, 2016, 5:30:57 PM1/17/16
to Fourty Love, Polymer

You call element methods like any other HTML element.m (querySelector etc). The docs have an example.

https://github.com/PolymerElements/paper-dialog/blob/master/demo/index.html


On Sun, Jan 17, 2016, 2:05 PM Fourty Love <awec...@gmail.com> wrote:
Sorry I'm completely new to polymer. How would I call that?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages