Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

uib-rating ignoring readonly property on mobile devices #5371

Closed
dackmin opened this issue Jan 31, 2016 · 5 comments
Closed

uib-rating ignoring readonly property on mobile devices #5371

dackmin opened this issue Jan 31, 2016 · 5 comments

Comments

@dackmin
Copy link

dackmin commented Jan 31, 2016

For some obscure reasons, readonly attribute is producing undefined when used in a Cordova wrapper.
To be sure that was an issue, I replaced readonly by test in my view & changed uib-rating isolated scope to :

readonly: '=test',

and everything seems to work fine, both on mobile and browser.

My tests were made on iOS (cordova) and I bet Cordova webview considers readonly attribute as a reserved one and makes it produce undefined when accessed if element is not an input/textarea.

Here's my config :

  • Angular 1.4.7
  • Angular bootstrap 1.1.1
  • Cordova 6 & Cordova-ios 4

I can't really provide a plunkr as it only happens inside a Cordova webview.
Thus I will also fill a Cordova-ios issue stating what I found, in case renaming readonly to something else, like read-only, is not imaginable.

Cheers,
Ugo.

@wesleycho
Copy link
Contributor

I'm not against renaming it to read-only - it's dangerous using attributes that have special meaning in the browser.

Would you be interested in filing a PR to rename it? Would mainly require readonly: '=?readOnly', and slight adjustments in the unit tests.

@wesleycho wesleycho modified the milestones: 1.1.2, 1.2.0 Jan 31, 2016
@dackmin
Copy link
Author

dackmin commented Jan 31, 2016

I'm really interested to do so, but wouldn't readonly: '=?readOnly' break things for those who use readonly for now ?

@wesleycho
Copy link
Contributor

It would be a breaking change, correct - that is why I scheduled it for the 1.2 release. It is a minor breaking change, which I'm ok with.

@dackmin
Copy link
Author

dackmin commented Jan 31, 2016

Will do it tomorrow or so then !

@wesleycho
Copy link
Contributor

Just noting, we just released 1.1.2 - 1.2.0 is next on our plate, so if you want to tackle this, try doing this when you can sometime in the next few weeks (within 2 weeks preferably to be on the safe side).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants