[Fixed] "Copy blueprint" button in topic review section reloads the page

Discussions related to the forums itself. Call for moderators. Trash Posts area.
User avatar
atomizer
Fast Inserter
Fast Inserter
Posts: 134
Joined: Sat Sep 22, 2018 3:18 pm
Contact:

[Fixed] "Copy blueprint" button in topic review section reloads the page

Post by atomizer »

1) click "post reply" on this topic
2) write something in the text box
3) scroll down to this post in "topic review" below and click this:
4) page reloads and reply text is lost
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: "Copy blueprint" button in topic review section reloads the page

Post by DaveMcW »

In HTML, <button> has type="submit" by default. This means an unmodified button will refresh the page.

To work around this, give the button type="button".

The button in the reply is unmodified because the blueprint script failed. Figuring out why it failed is trickier.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 845
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: "Copy blueprint" button in topic review section reloads the page

Post by Hares »

Fulgora is the best planet. Vulcanus needs rework. Feel free to prove me wrong.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 845
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: "Copy blueprint" button in topic review section reloads the page

Post by Hares »

BTW, 2 years passed since the proposed solution was posted here, but the bug still there and prevents Ctrl+Enter from working.
Fulgora is the best planet. Vulcanus needs rework. Feel free to prove me wrong.
User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 360
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: "Copy blueprint" button in topic review section reloads the page

Post by Sanqui »

DaveMcW wrote: Sun Jan 29, 2023 10:04 pm In HTML, <button> has type="submit" by default. This means an unmodified button will refresh the page.

To work around this, give the button type="button".
Well noted, thank you. I have applied the fix.
ovo
Post Reply

Return to “This Forum”