googlearchive / polymer-tutorial

Deprecated Polymer 0.5 tutorial app
211 stars 125 forks source link

Problem with Step 1 of the Tutorial #7

Closed nimish-shah closed 10 years ago

nimish-shah commented 10 years ago

I'm new to Polymer, so I started the tutorial by downloading the zip file from the Polymer website. I went through Step 1, and noticed some peculiar behavior:

Whenever I clicked on a paper-tab, the event was firing twice and writing two entries in the console. I thought it might be my code (in the starter folder), so I opened the index.html in the step-1 folder, and I observed the same behavior. image

Since I was observing this behavior in Chrome, I also tried opening the page in IE11, but it didn't work at all. I couldn't interact with the tabs because it was getting alot of "object does not support this action" errors. image

I'm running Chrome version 35.0.1916.153m and IE version 11.0.9600.17126.

I'm really looking forward to using Polymer. This may be a newbie error on my part setting it up, but I'd appreciate your help in resolving it.

robdodson commented 10 years ago

According to https://github.com/Polymer/paper-tabs/issues/6 the double core-select event is expected. It fires once for the selected item and once for the deselected item. You can use isSelected to determine the state of the item.

Check out the core-select event at the bottom of this page http://www.polymer-project.org/docs/elements/core-elements.html#core-selector

robdodson commented 10 years ago

ack sorry didn't mean to close. reopening till we can confirm the IE11 fix

nimish-shah commented 10 years ago

Thanks for the answer. I've changed my code. I also appreciate you continuing to look into the IE11 issue.

In terms of the behavior being as expected, I'd suggest that the code in the tutorial be changed to incorporate the check for isSelected. It would make the behavior of core-select much more clear to a novice of Polymer.

robdodson commented 10 years ago

In terms of the behavior being as expected, I'd suggest that the code in the tutorial be changed to incorporate the check for isSelected. It would make the behavior of core-select much more clear to a novice of Polymer.

Yep, that's on my todo list.

RE: the IE tabs issue... If you update your <body> tag to look like this:

<body touch-action="auto">

does that fix things for you?

nimish-shah commented 10 years ago

I tried <body touch-action="auto">, but I'm still getting the same error. image

Here's a screenshot of the IE debugger when I have it break on all exceptions.
image

robdodson commented 10 years ago

Hm ok. @frankiefu have you had issue with paper-tabs in IE11?

frankiefu commented 10 years ago

paper-tabs demo seems to work fine for me on IE11 on my vm. I thought the issue was that the components packaged with the tutorial were out of sync (https://github.com/Polymer/polymer-tutorial/issues/10) which is supposed to be fixed now.

robdodson commented 10 years ago

ah maybe that's it. @nimish-shah could you try downloading a fresh version of the tutorial and giving it another shot? We updated the versions of polymer and platform.js in there.

nimish-shah commented 10 years ago

I re-downloaded the tutorial, and it worked correctly in IE11. I appreciate your help.