joseph / Monocle

A silky, tactile browser-based ebook JavaScript library.
http://monocle.inventivelabs.com.au
MIT License
743 stars 200 forks source link

It does not work in Google Chrome version 44.0.2403.89 #259

Closed viktorvas19 closed 8 years ago

viktorvas19 commented 8 years ago

Hi !!!

The Monocle reader not work in Google Chrome version 44.0.2403.89. In previous versions there were no problems, but Chrome change the css rander (http://googlechromereleases.blogspot.com.es/2015/07/stable-channel-update_21.html) and now does not work

Any solution?

Best regards !!!

joseph commented 8 years ago

The line in dimensions/columns.js where it says not to use setX because of old iOS glitching — change it to use setX. I'll push the change to master this week.

— J

On Jul 30, 2015, at 7:38 AM, viktorvas19 notifications@github.com wrote:

Hi !!!

The Monocle reader not work in Google Chrome version 44.0.2403.89. In previous versions there were no problems, but Chrome change the css rander (http://googlechromereleases.blogspot.com.es/2015/07/stable-channel-update_21.html) and now does not work

Any solution?

Best regards !!!

— Reply to this email directly or view it on GitHub.

viktorvas19 commented 8 years ago

Thank you!

Your tip has been very helpful

Have a great day! :)

AbhilashThomas commented 8 years ago

@viktorvas19 Kindly elaborate.

yosimasu commented 8 years ago

Hi,

My chrome version is 44.0243.125.

  1. I fix dimensions/columns.js with @joseph 's suggestion. The first page of every chapter is invisible. Recalculate page count doesn't work fine.
  2. I try http://test.monoclejs.com/test/experimental/iframe-loading/ on chrome. I found: work fine: Normal Url document.write Data URI Import from iframe

    Every javascript stuff doesn't work.

So I try to fix core/component.js loadFrameFromHTML. modify

if (Monocle.Browser.env.loadHTMLWithDocWrite) {
      frame.contentDocument.open('text/html', 'replace');
      frame.contentDocument.write(src);
      frame.contentDocument.close();
} else {
      frame.contentWindow['monCmptData'] = src;
      frame.src = "javascript:window['monCmptData'];"
}

to

frame.contentDocument.open('text/html', 'replace');
frame.contentDocument.write(src);
frame.contentDocument.close();

It seems to work fine!

osanwe commented 8 years ago

@yosimasu It helped me too but I'm not sure that this is a right way...

AbhilashThomas commented 8 years ago

Yes, lets wait for official fix.

joseph commented 8 years ago

Thanks @yosimasu, that points the way to another fix. I've updated master with two fixes based on using translate3d instead of translateX, and this secondary fix of using document.write. Hopefully Google will address this in upcoming Chrome releases (the situation does seem to have improved in Chrome Canary).