Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Safari v7.0.5] TypeError: Attempted to assign to readonly property. #196

Closed
ghost opened this issue Jul 17, 2014 · 3 comments · Fixed by #200
Closed

[Safari v7.0.5] TypeError: Attempted to assign to readonly property. #196

ghost opened this issue Jul 17, 2014 · 3 comments · Fixed by #200
Labels

Comments

@ghost
Copy link

ghost commented Jul 17, 2014

Safari v6+ forbids assigning to readonly properties in strict mode.

It occurs here in master.

The only workaround I've found is to disable strict mode.

See requirejs/requirejs#392 and PaulUithol/Backbone-relational#393 for similar issues.

@jcbrand
Copy link
Member

jcbrand commented Jul 17, 2014

I think that refreshWebkit hack is actually only necessary for chrome and not for safari.

On chrome, without the hack, if you close a chatbox that has boxes to the left of it, those boxes don't move to the right to fill the gap left by the closed chatbox.

@g8g3 Can you perhaps check whether this bug occurs in Safari without that hack? In not, then we can add a more particular check there (only for Chrome). I don't have mac to test this with myself.

@jcbrand jcbrand added the bug label Jul 17, 2014
@ghost
Copy link
Author

ghost commented Jul 17, 2014

I could not test on mac (i.e. with Safari 6+), but only emulate Safari 5.
Still, I checked and Safari behaves just like Chrome: without the hack, the positioning bug occurs.


Maybe we could simply assign to the writable equivalent of offsetHeight: style.height.

conversejs.style.height = conversejs.offsetHeight;

It works on Chrome and Safari 5. I'll check tomorrow if it's OK with Safari 6+.

@jcbrand
Copy link
Member

jcbrand commented Jul 19, 2014

Cool, if it works will you please make a pull request?

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

Successfully merging a pull request may close this issue.

1 participant