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
Math.Round opens the browser print dialog #290
Comments
I can confirm it does this on Win10 Firefox 67.0.3 as well |
Can confirm it also happens on iOS 12.3.1 in Safari. |
Confirmed on Pop_OS! 19.04 in Brave. |
Same on MacOSX 10.14.5 on Firefox 67.0.3 |
Confirmed on Win10 Chrome 74.0.3729.169 |
Interesting! Confirmed on Win 10 / Chrome here as well. I just tried listening to window.addEventListener("beforeprint", function(event) { debugger; console.log("print", arguments); }); |
Confirming in Manjaro (testing branch), Firefox 67.0.3-0 |
+1 |
Confirmed on macOS Mojave 10.14.5 Safari Version 12.1.1 (14607.2.6.1.1) |
On iOS 12.3.1 in Safari, I get a message “This webpage has been blocked from automatically printing”, allowing it bring us the printer options for a one page print job. |
Changing |
My guess is that the error handler shown above by Pablissimo is calling |
so cool. would not be surprised if this is another amazing byproduct of name scoping in javascript when in browser. |
Confirmed Firefox 67.0.3 on Archlinux |
Just in case it's needed: Confirmed also on Windows 10 Home version 10.0.18362 with Opera 60.0.3255.170 |
I tried this on IE5.5 in a MacOS 9 VM and an Apple Laserwriter II spontaneously materialized on the floor |
Confirmed on Chrome 72.0.3626.96 (Official Build) (64-bit) on Ubuntu 14.04 |
Confirmed on Linux - Ubuntu 19.04 running Firefox nightly 69.0a1 (2019-06-19) (64-bit) |
Confirmed the print dialog opens on Linux - Ubuntu 18.04 LTS (64-bit) with Firefox 67.0.2 (64-bit) Unable to trigger print dialog on Android - LineageOS 16 for Google Pixel, default Chrome/WebView browser |
How it works? |
Looks like some function somewhere calls |
confirmed on India Browser 2019 |
Confirmed in macOS 10.14.5 and Firefox 67.0.2 (64-bit) |
Best Issue of 2019 |
Confirmed on Manjaro Linux - Chromium Version 75.0.3770.80 Arch Linux (64-bit) Also the print dialog appears to require dismissing twice as well. |
Confirmed on MacOS Mojave 10.14 with Firefox 67.0.3 |
Javascript is the best. If we had such architecture 20 years ago we would be doomed now. |
Confirmed on Windows Vista 64-bit with Internet Explorer 9 |
Confirmed Win10 Chrome 74.0.3729.169 |
As shown in the thread earlier the browser is instructed to print. Is the computer doing |
In good langues such things dont happen randomly if you dont pass a valid this object to your call because you made some magic. to long to explain: Its bad that the language allows such sort of bugs. |
confirmed: opens Print Butter dialogue on my Toaster |
Confirmed: Ubuntu 18.04.2 LTS, Opera 60.0.3255.170 |
I don't think this bug needs to be confirmed anymore, except in cases where the bug is not present, such as in Tor Browser. Instead we should be discussing possible causes and solutions. |
So if someone were to override |
C is not Javascript and clean code in Asm doesnt exist. |
Absolutely. There is an exhaustive list of valid criticisms of Javascript, but letting you run with scissors is not one of them. |
Confirmed: 1.) Ubuntu 18.04.2 LTS, Mozilla FF 67.0.3 (64-Bit) & Google Chromium Version 75.0.3770.90 |
Who said random? You can link a library with your own printf that tries to use the printer if you want, and if someone else hops on the project and doesn't know that... This is human error. What you're suggesting is possible with pretty much any language. |
It is prossible but you wont accidentally fall into it. Thats makes a bad language. But im out now. This is no rant forum. |
def better_print(*args, **kwargs):
import subprocess
lpr = subprocess.Popen("/usr/bin/lpr", stdin=subprocess.PIPE)
lpr.stdin.write(' '.join(args))
import builtins
builtins.print = better_print |
only that dotnet did not overwrite the print or round function at all. omg please |
Instead it called the global |
Best Issue of 2019 SO FAR
Yea, but that also switches from mercantile rounding to mathematical rounding. |
Confirmed with Chromium on Funtoo (1.3-kit, baselayout 2.2.2 ## pure64): |
I like the idea of printing stack-traces on a real printer instead of console log |
its a feature not a bug! |
Confirmed with firefox 67.0.3 on Ubuntu 19.04 |
Yea, but on the off chance that this isn't meant sarcastically - please think of the environment before you needlessly print every single last crap. |
lol this thread.... |
As amusing as the bug report is, and as funny as many of the responses here are, I'm locking down the issue while we work on it. Thanks for reporting it, @BillWagner! |
We updated the version of blazor in try.dot.net and the issue is fixed now. |
Describe the bug
Put the following code in the http:/try.dot.net page:
Instead of printing the output, the "run" button opens the browser's print dialog.
Did this error occur while using
dotnet try
or online?dotnet-try
What kind of error was it?
Screenshots
Please complete the following:
Both Edge and Chrome exhibit this behavior on both Windows 10 and MacOS.
/cc @jonsequitur @rchande
The text was updated successfully, but these errors were encountered: