Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

links no longer work #52

Open
duanwalker opened this issue Mar 17, 2015 · 2 comments
Open

links no longer work #52

duanwalker opened this issue Mar 17, 2015 · 2 comments

Comments

@duanwalker
Copy link

i am using test epub "0130 - rtl progression and vertical writing tests"
in the links sections (links-rtl-010 - links-rtl-030) the links no longer open their respective webpages. this used to work correctly but no longer work in build 0.17.2

iPad iOS 7.1.2

@danielweck
Copy link
Member

Just to double-check, I tried the cloud reader and it works fine:
http://readium-cloudreader.divshot.io/?epub=epub_content%2Fepub30-test-0130-20140611.

I must admit, I never tested external hyperlinks in the native application launchers. Would that normally result in opening mobile Safari on iOS? (or does the linked webpage open within the embedded WebView?)

@nodehack
Copy link

nodehack commented Apr 1, 2015

Links will open in the embedded WebView unless you tell the WebView not to load the request and open the request via: [[UIApplication sharedApplication] openURL:theRequest.URL]. That should open the link in Safari or if its a mailto link it will open the mail application.

I've run into this issue with WKWebView as well. If you comment out the following code in jQuery then external links will work again. This however has a side effect that internal links (such as those found in a ToC) will cause odd behavior around navigating prev/next pages. Something odd is afoot!

    if ( !(eventHandle = elemData.handle) ) {
        eventHandle = elemData.handle = function( e ) {
            // Discard the second event of a jQuery.event.trigger() and
            // when an event is called after a page has unloaded
            return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
                jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
                undefined;
        };
        // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
        eventHandle.elem = elem;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants