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

"Selection deleted" appears on print media #1298

Closed
fonsp opened this issue Nov 14, 2023 · 3 comments
Closed

"Selection deleted" appears on print media #1298

fonsp opened this issue Nov 14, 2023 · 3 comments

Comments

@fonsp
Copy link

fonsp commented Nov 14, 2023

Describe the issue

We got a report that the text "Selection deleted" from the announceDOM element can appear on a printed PDF of a document with lots of codemirrors.

Original report: fonsp/Pluto.jl#2704 (unfortunately I don't have a PDF document that demonstrates it and I can't reproduce it)

I made a related PR: codemirror/view#43, but apparently something is different in the PDF. Perhaps a class can be added (announceDOM) to let us exclude it in @media(print), or we could add something like user-select: none; color: transparent; pointer-event: none; to the style.

Browser and platform

https://github.com/JuliaPluto/codemirror-pluto-setup/blob/main/package.json

Reproduction link

No response

@marijnh
Copy link
Member

marijnh commented Nov 14, 2023

I'd be interested to at least know the browser/tool they used to print. The live element is positioned way off the screen, so unless you're doing something like a layout-less printing of innerText, it's weird that it would show up.

@fonsp
Copy link
Author

fonsp commented Nov 15, 2023

A PDF example and some browser info at fonsp/Pluto.jl#2704 . AFAIK the text is never visible without printing. Hope this helps!

@marijnh
Copy link
Member

marijnh commented Nov 15, 2023

Odd, it does look positioned, but in a place that doesn't match the style. Attached patch adds the @media rule.

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

2 participants