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

Broken support for EPUBs with scripted visual user interaction / drag-and-drop #1599

Closed
danielweck opened this issue Dec 6, 2021 · 0 comments

Comments

@danielweck
Copy link
Member

The CSS is fine in the user interface:

*,
*::after,
*::before {
-webkit-user-drag: none;
-webkit-app-region: no-drag;
}

*,
*::after,
*::before {
-webkit-user-drag: none;
-webkit-app-region: no-drag;
}

... but problematic inside EPUB XHTML content documents:

*,
*::after,
*::before {
-webkit-user-drag: none !important;
-webkit-app-region: no-drag !important;
}

document.addEventListener("dragstart", (e) => {
const sel = document.getSelection();
if (sel && !sel.isCollapsed) {
// e.dataTransfer.setData("Text", "_");
e.preventDefault();
}
});

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

No branches or pull requests

1 participant