joseph / Monocle

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

IE check #256

Open ludis opened 9 years ago

ludis commented 9 years ago

This check for IE in monocle.js 3.2.0, in Monocle.Browser.is: IE: !!(window.attachEvent && !Monocle.Browser.uaMatch('Opera')),

// above check fails on IE11 // http://stackoverflow.com/a/20411654 IE: (navigator.userAgent.indexOf('MSIE') !== -1 || navigator.appVersion.indexOf('Trident/') > 0),

Seems to work fine.

jyssh commented 9 years ago

I second this change. Monocle seems to incorrectly identify IE 11 engine as Gecko.

Monocle.Browser.engine === 'Gecko'

With the suggested change above, Monocle correctly identifies IE11, which fixes an issue I am facing - due to incorrect identification, horizontal and vertical scrollbars appear in the reader.