-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
How do I close the annoying pop-up window? #16861
Comments
Are you editing something when you want to leave the page? |
It is probably related to autofill of fields. We may need to change their names to discourage chrome etc from guessing that what they should hold |
I did not edit any content. And I hope that no matter whether I have edit settings or not, I don’t want this pop-up window to appear. |
In other words, is it currently impossible to solve the problem by configuring the app.ini file? |
Just press the leave button each time. As I say it's not coming from gitea directly but from Chrome. Chrome is guessing that you want these values filled and is then detecting a changed form. There will be a way of telling Chrome that the name field here is not supposed to be your name but off the top of my head I don't know how. |
Instead of using the form, changing to javascript to listen to the click event of the button should be able to avoid this problem. |
Let me attempt to be a little clearer. This is coming directly from your browser. Your browser is telling you that the form is being left unsubmitted whilst there are changes - changes it itself made without being asked to do so, because it has matched the form fields with data it wants to change. Javascript will not solve or improve this. The solution is to stop the browser from auto-filling the fields by changing the form field names, roles or otherwise. |
I meet this problem too. @zeripath is right. The key point is that gitea has the prompt if a user try to leave a page but some form inputs were changed. Chrome auto-fills many input fields. I think we can have a quick fix to keep things clear and satisfy users: Let gitea only detect form changes after 5 (or 10) seconds. Chrome will auto-fill inputs in short time. After that time, the changes should belong to users. If you feel OK, I can propose a PR. |
Add ignore-dirty to /user/settings/account Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings Fix go-gitea#16861 Signed-off-by: Andrew Thornton <art27@cantab.net>
I've done two things:
|
Well, what I want to say is not js to operate the form, but to implement the form-like function through js, such as this: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello World</title>
</head>
<body>
<div class="input" contenteditable="true">please input.</div>
<script type="text/javascript">
function inputDemo() {
let inputDiv = document.getElementsByClassName("input")[0]
alert(inputDiv.innerHTML)
}
</script>
<button onclick="inputDemo()">send</button>
</body>
</html> Will this method be detected by chrome? |
I can get your point, but I think it's not reasonable to introduce the complex mechanism. You see, if we draw a snake and find what we draw has some flaws, adding feet to the snake doesn't make it more like a snake. Instead we should perfect the picture we drawn. |
The associated pr should solve the issue. |
Add ignore-dirty to /user/settings/account Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings Fix #16861 Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport go-gitea#16912 Add ignore-dirty to /user/settings/account Add autocomplete="off" to push_mirror_address form on /:owner/:repo/settings Fix go-gitea#16861 Signed-off-by: Andrew Thornton <art27@cantab.net>
Another trial: #17291 |
The content of this pop-up window is:
Leave this site?
The system may not save your changes.
This pop-up window appears when operating the warehouse settings.
As long as I access via https, this pop-up window will appear, but http does not.
My browser is chromium, and this pop-up window will appear in the settings of the operating warehouse. But there is no such pop-up window in Firefox.
How can I prevent pop-ups from appearing?
The text was updated successfully, but these errors were encountered: