OBrink / DECIMER.ai

This repository contains the code for https://decimer.ai
MIT License
38 stars 9 forks source link

In Safari, Ketcher window stays empty #6

Closed OBrink closed 2 years ago

OBrink commented 2 years ago

The SMILES str is displayed correctly but the structure is not loaded in the Ketcher window

Kohulan commented 2 years ago

We have to consult with ketcher app developers

OBrink commented 2 years ago

I have tested the web app in the latest version of Chrome, Opera, Edge and Firefox and Safari on BrowserStack. Everything runs smoothly except for Safari. Safari 11.1|12.1|13.1|14.1|15.3 JS console:

"TypeError: undefined is not an object (evaluating 'ketcher.setMolecule')"

OBrink commented 2 years ago

I have filed an issue here.

OBrink commented 2 years ago

Safari users now get a warning that the app may not work.

OBrink commented 2 years ago

The issue is solved with a modification of the loadMol function. It now checks whether or not the Ketcher window is loaded before trying to load a molecule. If it is not loaded, it waits 100ms and calls itself again.