Try it
button on the right hand sideBrave
and click OK
Hello Brave! How are you today?
is shownOK
Try it
button on the right hand sideCancel
buttonUser cancelled the prompt.
is shownCancel
We can patch here:
https://github.com/atom/electron/blob/c4931bb2d12f5905cdf434ed6ff1a755ccad053f/atom/renderer/lib/override.coffee#L92
window.prompt
I think the work I'm doing in electron right now might help out with this
looks like prompt is still not supported?
So maybe is this the reason of #1723, #1311, #1859 and like that?
+1 from @CliqueBait via https://github.com/brave/browser-laptop/issues/3295
+1 from Twitter; a user who would like to use Brave internally, but cannot due to the lack of window.prompt
: https://twitter.com/jamonholmgren/status/821964305964765184
@bridiver do you know if the underlying support is there for this? If so, I can knock this out pretty easily. It should help w/ out extension support
We are currently relying on window.prompt for our dashboard, so support for this would be highly appreciated! :)
Just learned from a user today that WooCommerce (3+ million WordPress users) uses window.prompt
.
+1 from Community: https://community.brave.com/t/dialogue-alert-pop-up-preferences/1974
Chromium to change behavior of dialogs: Chromium policy on JavaScript dialogs
1+ need it for my WebApp....
(#push)
It is not likely that electron is going to implement prompt
.
see https://github.com/electron/electron/issues/472
@mojoaxel we don't need electron to implement prompt because we have our own fork that has diverged significantly. It wouldn't be difficult to implement prompt
+1 from peterkroon via https://github.com/brave/browser-laptop/issues/11010
Steps to Reproduce
Go to: https://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt
Click on button "Try it!"
Plus one "wow, this is a thing?" I am pretty shocked I've run into this... to be honest, I was just messing around with getting a simple input value. Was this intentionally bypassed for any particular reason?
@shortstuffsushi not bypassed for any reason- we just haven't had the time to implement it yet
I did rework a lot of the alert code and I believe it should be somewhat easy to add:
Here is the block of code that gets called when window.prompt is triggered
https://github.com/brave/browser-laptop/blob/41a0523d088f2c90a2148eafd40f52b9d10dcedf/app/browser/tabMessageBox.js#L47-L52
The smart move might be to edit the MessageBox component to allow for an edit control and handle prompts using the existing tabMessageBox code
Warning: The Try it
button in the example above crashes the browser. Reproduced with Brave 0.20.30 on macOS 0.13.x.
Tentatively assigning to 0.23.x since this does cause a crash
+3 from https://community.brave.com/t/brave-crashes-upon-javascript-popup-in-google-tasks/15138/6
@bsclifton can this be moved up to 0.24.x?
馃帀 Thanks guys. Now if I want to super lazily implement user input, I don't have to do any extra work.
+1 from community: https://community.brave.com/t/javascript-prompt-not-prompting/11315
Verified with macOS 10.12.6 using
Verified on Ubuntu 18 x64 using
Most helpful comment
馃帀 Thanks guys. Now if I want to super lazily implement user input, I don't have to do any extra work.