Add menu option for copying supported images in lightbox (#4614)

This commit is contained in:
Vin Howe 2020-11-02 17:47:46 -07:00 committed by GitHub
parent 2373209834
commit 526ab4fe29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 15 deletions

View file

@ -544,7 +544,8 @@ try {
);
const link = e.target.closest('a');
const selection = Boolean(window.getSelection().toString());
if (!editable && !selection && !link) {
const image = e.target.closest('.module-lightbox img');
if (!editable && !selection && !link && !image) {
e.preventDefault();
}
});