-
Notifications
You must be signed in to change notification settings - Fork 45
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
SDKLauncher-iOS Highlight does not work on IOS #91
Comments
https://github.com/readium/SDKLauncher-iOS/blob/master/Classes/EPubViewController.m#L176
Replace "JAVASCRIPT_CODE" with: Note, that's how it's also done in the cloud reader / Chrome app: PS: don't forget to |
Thank you very much Daniel. this is the debug code
this.addSelectionHighlight = function(id, type, styles, clearSelection) {
window.webkit.messageHandlers.readium.postMessage({body: 'addSelectionHighlight'});
for(var spine in liveAnnotations) {
var annotationsForView = liveAnnotations[spine];
if (annotationsForView.getCurrentSelectionCFI()) {
var annotation = annotationsForView.addSelectionHighlight(
id, type, styles, clearSelection);
return new BookmarkData(spines[spine].idref, annotation.CFI);
}
}
return undefined;
}; the addSelectionHighlight() function cann't execute Thanks in advance, |
What do you mean by "cannot execute"? Is there an error like "undefined function"? Or is another exception raised? |
Thank you Daniel for your fast response and help |
Ah, sorry, there is a bug in: |
Thank you |
Is the error coming from |
Note that the same code is used in the cloud reader / Chrome app: iOS: |
the host_app_feedback.js file in code: Thank you so much Daniel |
The |
FYI, "plugin.annotations" now renamed to "plugin.highlights". iOS fix: OSX fix: Android fix: |
Hi Daniel |
Interesting. This looks like an iOS -specific bug (touch events). @jccr did you come across this? |
It works
Thank you so much Daniel |
Hi @danielweck |
Hi @danielweck |
On iOS, |
@lwm561 Thanks for the feedback. Issue filed: readium/readium-shared-js#364 |
@nimisis Thank you for reporting this. Issue filed: readium/readium-shared-js#365 |
@nimisis I am not able to find references to |
@danielweck Sure, it triggered on line 117 of index.js when I was debugging with Safari, but it looks like it's at line 15105 of readium-shared-js_all.js of the single bundle or line 14898 of readium-external-libs.js of the multiple-bundles. Hope that helps! |
oh, this sounds like a bug in an external library then. what revision of Readium are you using? (git commit hash) |
This one - readium/readium-sdk@153ee28 |
@nimisis build instructions in the README: https://github.com/readium/readium-shared-js/blob/develop/README.md#prerequisites |
SDKLauncher-iOS I don't know how to use object-c call javascript(readium-plugin-highlights.js) function,
Is there a way to do highlight in iOS。
Thanks in advance,
Kind regards
The text was updated successfully, but these errors were encountered: