sabbath-school-android icon indicating copy to clipboard operation
sabbath-school-android copied to clipboard

Context menu (share, copy, search) doesn't work

Open merlin-zaraza opened this issue 7 years ago • 5 comments

Context menu (share, copy, search) doesn't work in next case:

  1. Select text and make some highlight.
  2. Select highlighted text by one tap.
  3. Use share, copy or search

Result: Nothing shared, copied or searched.

merlin-zaraza avatar Mar 04 '18 11:03 merlin-zaraza

Reproducible? It works for me (video):

Google Drive

@merlin-zaraza Maybe try posting a screen recording of the issue? What version of Android are you using?

imasaru avatar Mar 04 '18 15:03 imasaru

I can reproduce on my end. @imasaru are you doing a single tap (without holding)?

VitalikL avatar Mar 04 '18 18:03 VitalikL

@VitalikL Whoops. I totally missed that in his 2nd step. I was tapping and holding, sorry 😓

EDIT: I can reproduce it. So is the issue with the text not being highlighted? When I single-tap a highlighted text block, I can select to share, highlight, etc. but no text is selected, so nothing happens.

imasaru avatar Mar 04 '18 20:03 imasaru

@merlin-zaraza @imasaru @TinasheMzondiwa I can also reproduce. This is interesting issue as technically nothing is "selected", but I guess we can find a workaround by asking WebView to give us the selection content. I will look into sabbath-school-reader to add this functionality

VitalikL avatar Feb 27 '21 00:02 VitalikL

Hi @VitalikL, Can I help you?

I think that we can receive the value from SSReadingView an ViewModel to this function in ss-reader.js

copy: function(**highlightId**){ //evaluate parameter... SSBridge.onCopy(window.getSelection().toString()); this.clearSelection(); },

Then we can evaluate it if(highlightId > 0) and then retrieve the string value for copy, search and share operations otherwise (else) we can use the current behavior.

This is only an untested idea because I cant pass this error: com.pspdfkit.exceptions.InvalidPSPDFKitLicenseException: licenseKey must be a valid license key or null for trial mode.

charlykno64 avatar Nov 28 '21 08:11 charlykno64