PolymerElements / iron-input

An input with data binding
https://webcomponents.org/element/PolymerElements/iron-input
33 stars 45 forks source link

`Error: Cannot read property 'disconnect' of undefined` when `wc-shadydom=true` #104

Closed manolo closed 7 years ago

manolo commented 7 years ago

Description

detached can be called before attached causing an error due that _observer has not yet defined. It only happens when ?wc-shadydom=true

Found the error during the fixture initialisation when using a paper-input.

Expected outcome

no error

Actual outcome

Error: Cannot read property 'disconnect' of undefined

Steps to reproduce

Create a test with this content

<!doctype html>
<html>

<head>
  <script src='../../web-component-tester/browser.js'></script>
  <link rel="import" href="../../test-fixture/test-fixture.html">
  <link rel="import" href="../../iron-test-helpers/test-helpers.html">
  <link rel="import" href="../../paper-input/paper-input.html">
</head>

<body>

<test-fixture id='test'>
  <template>
    <paper-input></paper-input>
  </template>
</test-fixture>

<script>
  describe('something', function() {
    var paperInput;

    beforeEach(function() {
      paperInput = fixture('test');
    });

    it('should just work', function() {
    });
  });
</script>

</body>
</html>

Browsers Affected

notwaldorf commented 7 years ago

This should be fixed in 6c2dd5e. Please let me know if it's not! :)