minor scrolling bug

User 870ab5b546

31-01-2017 19:06:50

I have recently added several buttons to the southern toolbar. When I first load MarvinJS into a Web page, the scroll button of the southern toolbar is inactive (see screenshot), so several of the buttons are not accessible. If I grab the bottom right corner of the MarvinJS window to make it larger, then reduce it back to its original size, then the scroll button becomes active. But it's not obvious to a user that a required button might be accessible this way, so please have MarvinJS recognize upon loading whether it needs to make the scroll button active. 

ChemAxon 76c88f5366

01-02-2017 09:47:30

Hi Bob, 


I cannot reproduce this issue by including a several structure-containing template file in the iframe tag as data-templateurl.


Could you give more information about the way, you set the templates, the version of the Marvin JS you use and the name of the preset you used?
I saw custom buttons on the toolbar. Could you also tell me how did you included these? 


A code snippet, and the original template file would be a great help.


Thank you in advance.


Best regards,
Eszter 

User 870ab5b546

01-02-2017 15:26:59

Try this.



  1. Go to this page. I expect you'll see an active scrollbar button.

  2. Return to this page.

  3. Go back to the same page as before. Now I expect you'll see an inactive scrollbar button.

  4. Now go to this page. I expect you'll see an inactive scrollbar button again.


It seems the scrollbar button activates properly the first time MarvinJS loads in a browser, but then does not activate properly in subsequent loads.


The code that launches MarvinJS 16.4.18 is in the resource marvinJSStart.js at either of the aforementioned pages. 


I'm using Safari 10.0.3 on MacOS 10.12.3. 

ChemAxon 76c88f5366

01-02-2017 17:09:41

Hi Bob,


I did not have the time to check your code in every detail, yet. 


But at first sight it seems to me that the problem is, that the additional buttons are loaded after the initialization of the iframe. 


This seems the reason of when you update the size of the iframe, the slide button is also updated.

User 870ab5b546

01-02-2017 17:40:10

How can you add the buttons to MarvinJS before the iframe is loaded with MarvinJS?


Anyway, I think the problem may be browser-specific. I can reproduce the problem in Firefox, but not in Chrome. 

ChemAxon 76c88f5366

02-02-2017 14:50:47

Hi Bob,


Thank you for reporting this, I have created an item about this problem in our issue tracking system. 


I am sorry for the inconvenience, we will notify you when the fix is ready.


Best regards,
Eszter