Bug 276709
| Summary: | ceac.state.gov - failing and automatically exit the user | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | WebKit Misc. | Assignee: | Karl Dubost <karlcow> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://ceac.state.gov/ | ||
| See Also: |
https://bugs.webkit.org/show_bug.cgi?id=260938 https://bugs.webkit.org/show_bug.cgi?id=267569 https://bugs.webkit.org/show_bug.cgi?id=267449 |
||
| Bug Depends on: | 193478 | ||
| Bug Blocks: | |||
Karl Dubost
There is a long history with this site.
see previously https://github.com/WebKit/WebKit/commit/0b543cc9ff31a50857a570a65f9d33f405b30a15
and https://github.com/WebKit/WebKit/pull/17329/files
The hypothesis this is still broken is because it doesn't try to match `.ceac.state.gov`, just `ceac.state.gov`
To note that the real issue is about Bug 267449
which manifests itself on this site by
There is a beforeunload
if (window.addEventListener) {
window.addEventListener("beforeunload", ClearSession, false);
} else if (window.attachEvent) {
window.attachEvent("onbeforeunload", ClearSession)
}
It fires a ClearSession.
Which triggers
else if (document.location.pathname.indexOf("Default.aspx") < 0 &&
typeof document.activeElement != "undefined" &&
document.activeElement.toString().indexOf("HTMLBodyElement") > 0 ||
document.activeElement.toString().indexOf("HTMLInputElement") > 0) {
validNavigation = false;
}
And triggers:
this.ExitClearSession()
Which triggers the e.preventDefault()
if (validNavigation == false &&
e != undefined) {
if (ieMode == "True") {
e.returnValue = undefined;
} else {
e.preventDefault();
}
And when the return is happening at the end of ClearSession it opens the alert.
Firefox in the clear session is
} else if ((typeof document.activeElement != "undefined" &&
document.activeElement != "object" &&
typeof document.activeElement.name != "undefined") && (
document.activeElement.toString().indexOf("aspx") > 0 || //for the left menu exclusion
document.activeElement.name.indexOf("btn") > 0 || //check for button click
document.activeElement.name.indexOf("Button") > 0 ||
document.activeElement.type == "button") ||
document.activeElement.id.indexOf("cbx") > 0 ||
document.activeElement.id.indexOf("Radio") > 0 ||
document.activeElement.id.indexOf("radio") > 0 ||
document.activeElement.id.indexOf("chkbx") > 0 ||
document.activeElement.id.indexOf("Button") > 0 ||
document.activeElement.id.indexOf("button") > 0) { // for button
validNavigation = true;
Firefox: document.activeElement is input
Safari: document.activeElement is body
This will decide if validNavigation is true or false
And then will make WebKit fail for the next step.
Let’s make a test
https://codepen.io/webcompat/pen/zYbKgGd
<input type="checkbox" id="check" onclick="logme(this)">
<div id="log"></div>
With
var check = document.querySelector("#check");
var log = document.querySelector("#log");
function logme(element) {
log.textContent += document.activeElement;
}
log.textContent = check;
* Firefox: HTMLInputElement
* Chrome: HTMLInputElement
* Safari: HTMLBodyElement
but there other ways to fail too.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Karl Dubost
Let's try first to add again .ceac.state.gov
Karl Dubost
Note also that an outreach effort has been tried for a couple of years without success.
Karl Dubost
<rdar://127700271>
Karl Dubost
Pull request: https://github.com/WebKit/WebKit/pull/30900
EWS
Committed 281059@main (52ff8f16da2a): <https://commits.webkit.org/281059@main>
Reviewed commits have been landed. Closing PR #30900 and removing active labels.
EWS
Committed 280938.64@integration/ci/127700271_52ff8f16da_safari-7619-branch (f63da3515898): <https://commits.webkit.org/280938.64@integration/ci/127700271_52ff8f16da_safari-7619-branch>
Reviewed commits have been landed. Closing PR #1420 and removing active labels.