thomas-institut / apm

Digital Edition web application for the Averroes Project
GNU General Public License v3.0
2 stars 0 forks source link

Editor does not work in firefox and safari on Richard's laptop #42

Closed BartChris closed 7 years ago

BartChris commented 7 years ago

On Richard's pc firefox and safari do not show the editor. Chrome is working as expected.

The console in firefox throws the following error:

SyntaxError: missing = in const declaration  EditorBlots.js:40:15
ReferenceError: Clipboard is not defined  EditorClipboard.js:23:1
SyntaxError: missing = in const declaration  EditorData.js:73:15
SyntaxError: missing = in const declaration  TranscriptionEditor.js:192:25
SyntaxError: missing = in const declaration  pageviewer.js:52:15 

The console in safari throws the following error:

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (boolval.js.map, line 0)
[Error] TypeError: Attempted to assign to readonly property.
    prop (jquery.js:7623)
    access (jquery.js:3990)
    resizeEditor (TranscriptionEditor.js:1343)
    disable (TranscriptionEditor.js:977)
    TranscriptionEditor (TranscriptionEditor.js:93)
    (anonyme Funktion) (pageviewer.js:95)
    fire (jquery.js:3305)
    fireWith (jquery.js:3435)
    done (jquery.js:9242)
    (anonyme Funktion) (jquery.js:9484)
[Log] Resizing (TranscriptionEditor.js, line 82)
[Log] 48 (TranscriptionEditor.js, line 83)
rafaelnajera commented 7 years ago

@BartChris: what version of Firefox does Richard have?

We can't support Safari since we don't have a practical way to test / debug in it.

BartChris commented 7 years ago

@rafaelnajera He is using version 54.0.1., seems to be the latest version.

Update: Ok. now it works. It seems like the browser cache needs to be reseted. Maybe i should be more careful in using these new features in the context of DARE and rely on more stable syntax, which is supported by older versions of firefox, too.

For older browsers we might think of using a transpiler in the production system. https://babeljs.io/ On my windows machine with safari version 5.1, the browser is not supporting syntactic sugar like "class" or "const"


SyntaxError: Unexpected token 'const'
apiurl.js:19SyntaxError: Use of reserved word 'class'
Item.js:37SyntaxError: Use of reserved word 'class'
EditorBlots.js:27SyntaxError: Expected an identifier but found 'Inline' instead
EditorClipboard.js:23SyntaxError: Use of reserved word 'class'
EditorData.js:25SyntaxError: Use of reserved word 'class'
TranscriptionEditor.js:29SyntaxError: Use of reserved word 'class'
pageviewer.js:49SyntaxError: Expected an identifier but found 'langs' instead