-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Commit 4b96c6766c15ffc66ce399e33179b851049b5839 introduces regression #837
Comments
oh, this commit is part of the story to make the latest HTMX test suite working... will have a look. |
Reverting that commit (and adding diff --git a/src/main/java/org/htmlunit/html/DomElement.java b/src/main/java/org/htmlunit/html/DomElement.java
index 6469c1bd09..3cf4bce55d 100644
--- a/src/main/java/org/htmlunit/html/DomElement.java
+++ b/src/main/java/org/htmlunit/html/DomElement.java
@@ -1116,12 +1116,19 @@ public class DomElement extends DomNamespaceNode implements Element {
stateUpdated = true;
}
- final ScriptResult scriptResult = doClickFireClickEvent(event);
- final boolean eventIsAborted = event.isAborted(scriptResult);
+ final AbstractJavaScriptEngine<?> jsEngine = page.getWebClient().getJavaScriptEngine();
+ jsEngine.holdPosponedActions();
+ try {
+ final ScriptResult scriptResult = doClickFireClickEvent(event);
+ final boolean eventIsAborted = event.isAborted(scriptResult);
- final boolean pageAlreadyChanged = contentPage != page.getEnclosingWindow().getEnclosedPage();
- if (!pageAlreadyChanged && !stateUpdated && !eventIsAborted) {
- changed = doClickStateUpdate(shiftKey, ctrlKey);
+ final boolean pageAlreadyChanged = contentPage != page.getEnclosingWindow().getEnclosedPage();
+ if (!pageAlreadyChanged && !stateUpdated && !eventIsAborted) {
+ changed = doClickStateUpdate(shiftKey, ctrlKey);
+ }
+ }
+ finally {
+ jsEngine.processPostponedActions();
}
if (changed) { |
@csware do you have a test page where i can debug this? |
Unfortunately not, I collected the HTML pages of the Shibboleth login process, replaced all SAML data, but I cannot reproduce the issue with that page. There also must be something else. Examples.zip |
thanks, that helps a bit (and matches my theory) - will try to build a test case |
Sorry for being not that responsive during the last days - was on a workshop and will be out for two more weeks to have a holiday break. Afterwards we can work together to get this finally done. |
I've a reproducer that I can provide confidentially. |
Cool... please send a mail... |
Sent. |
It seems as if 4.5.0 fixed the issue, however, it behaves differently here compared to 4.3.0 as the "auto"-submit is not performed. |
Have done a fix also. Will write some test for this and hopefully do a release at the beginning of next week. |
@csware i think this is finally fixed. Have written i test case (based on your sample) that shows the problem is gone. Hopefully i will do a release tomorrow. |
Commit 4b96c67 causes Shibboleth login to fail (this is the first commit where this issue happens, identified using bisecting). Shibboleth receives a HTML post and then generates a HTML page with an onload action and/or a single submit button in a noscript block that redirects the request back to a calling web page.
Please revert that commit. Based on the commit description (and the separate commits that follow), I cannot see what problem it was trying to fix.
The text was updated successfully, but these errors were encountered: