WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
276709
ceac.state.gov - failing and automatically exit the user
https://bugs.webkit.org/show_bug.cgi?id=276709
Summary
ceac.state.gov - failing and automatically exit the user
Karl Dubost
Reported
2024-07-17 01:15:25 PDT
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
Comment 1
2024-07-17 01:16:05 PDT
Let's try first to add again .ceac.state.gov
Karl Dubost
Comment 2
2024-07-17 01:17:14 PDT
Note also that an outreach effort has been tried for a couple of years without success.
Karl Dubost
Comment 3
2024-07-17 01:24:10 PDT
<
rdar://127700271
>
Karl Dubost
Comment 4
2024-07-17 01:45:47 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/30900
EWS
Comment 5
2024-07-17 11:38:11 PDT
Committed
281059@main
(52ff8f16da2a): <
https://commits.webkit.org/281059@main
> Reviewed commits have been landed. Closing PR #30900 and removing active labels.
EWS
Comment 6
2024-07-19 08:44:35 PDT
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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug