old-docs-site icon indicating copy to clipboard operation
old-docs-site copied to clipboard

Polymer.PropertiesMixin fails to create property accessors in IE11 for certain important names like "disabled"

Open TimvdLippe opened this issue 6 years ago • 4 comments

From @bashmish on April 7, 2018 10:11

Description

Polymer.PropertiesMixin fails to create property accessors in IE11 for certain important names like disabled.

Live Demo

https://github.com/bashmish/bug-ie11-polymer-properties-mixin

Steps to Reproduce

Open tests and see what is failing in IE11 comparing to other browsers.

Expected Results

disabled has corresponding accessors that allow to react to changes.

Actual Results

No accessors are created for disabled.

Browsers Affected

This is not clear to me. I think that it's not only IE11 since the logic seems to be a little bit naive for how accessors are created. But in IE11 it's a way more problematic.

  • [ ] Chrome
  • [ ] Firefox
  • [ ] Edge
  • [ ] Safari 9
  • [ ] Safari 8
  • [x] IE 11

Versions

  • Polymer: 2.6.0
  • webcomponents: 1.2.0

Copied from original issue: Polymer/polymer#5183

TimvdLippe avatar Apr 10 '18 17:04 TimvdLippe

This likely clashes because IE11 has a property accessor defined for this property: http://jsbin.com/duzeloj/edit?html,console,output

TimvdLippe avatar Apr 10 '18 17:04 TimvdLippe

From @sorvell on April 10, 2018 17:46

In general creating property accessors for native properties like disabled is (unfortunately) not supported. It looks like we failed specifically to list disabled in the docs related to this here: https://www.polymer-project.org/2.0/docs/devguide/data-binding#native-binding. We'll leave this issue open so we can address the docs.

TimvdLippe avatar Apr 10 '18 17:04 TimvdLippe

How is that possible then that disabled works well in Polymer (I guess thanks to Polymer.PropertyAccessors), for example in paper-input https://www.webcomponents.org/element/PolymerElements/paper-input/elements/paper-input#property-disabled ?

bashmish avatar Apr 10 '18 18:04 bashmish

@sorvell As @bashmish said, we've done this for a number of elements in the past. It's unclear to me whether this is a new problem, or what.

Also tagging @notwaldorf as paper-input wiz. Seems to me that our elements have regularly declared disabled as a property...

arthurevans avatar Jun 05 '18 18:06 arthurevans