FLUID-5298: strict mode breaks Infusion components in Safari

Metadata

Source
FLUID-5298
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Jonathan Hung
Created
2014-04-01T15:40:32.355-0400
Updated
2014-04-08T15:23:57.333-0400
Versions
N/A
Fixed Versions
  1. 1.5
Component
  1. Framework

Description

Strict mode breaks Infusion components in Safari causing the following error to appear in the console. Disabling strict mode fixes this. Firefox and Chrome in Mac is fine.

[Error] TypeError: Attempted to assign to readonly property.
(anonymous function) (Fluid.js, line 1461)
transformInternal (Fluid.js, line 419)
transform (Fluid.js, line 440)
(anonymous function) (Fluid.js, line 1460)
transformInternal (Fluid.js, line 419)
transform (Fluid.js, line 444)
annotateListeners (Fluid.js, line 1458)
rawDefaults (Fluid.js, line 1476)
defaults (Fluid.js, line 1530)
(anonymous function) (OverviewPanel.js, line 24)
[Error] TypeError: '[object Object]' is not a function (evaluating 'fluid.overviewPanel(".flc-overviewPanel")')
(anonymous function) (overviewPanel.html, line 44)
fire (jquery.js, line 3099)
fireWith (jquery.js, line 3211)
ready (jquery.js, line 3423)
completed (jquery.js, line 3453)

To reproduce:
1. Load any infusion demo (i.e. image reorderer or inline edit) in Safari
2. Notice you can't interact with the demo.
3. Remove / comment 'use strict' from Fluid.js
4. Reload demo in Safari - notice that the demo works.

Environments

Safari 7.0.2 (9537.74.9)

Comments

  • Justin Obara commented 2014-04-01T16:20:49.759-0400

    From what I can tell it happens when onerec in fluid.annotateListeners is a string instead of an object literal. I suppose this is similar to FLUID-5297 except that it was let through by most browsers because it uses dot notation instead of array notation.

  • Justin Obara commented 2014-04-08T15:23:57.313-0400

    Merged pull request ( https://github.com/fluid-project/infusion/pull/488 ) into the project repo at e77d48f49d07f88e7dff4befc547874da29b6c01