mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-24 02:20:24 +01:00
Change exit action for HTML5
Previously HTML5 exports would reload the page on exit. This commit changes the behaviour to go back to the previous page (if any) or close the tab and/or window if there is no previous page.
This commit is contained in:
parent
f8ab8ddd61
commit
2b3d4533c4
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ func _on_Terminal_key_pressed(data: String, event: InputEventKey) -> void:
|
|||
scene.queue_free()
|
||||
"Exit":
|
||||
if OS.has_feature("JavaScript"):
|
||||
JavaScript.eval("window.location.reload()")
|
||||
JavaScript.eval("window.history.back() || window.close()")
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue