Open webcompat-bot opened 2 years ago
We appreciate your report. I was able to reproduce the issue. Tapping on the buttons returns no action from the page:
Tested with: Browser / Version: Firefox Nightly 98.0a1 (2015860011 -🦎98.0a1-20220127094620🦎)/Chrome Mobile Version 97.0.4692.98 Operating System: Samsung A51 (Android 11) -1080 × 2400 pixels 20:9 aspect ratio (~405 ppi density)
Notes:
Moving this to NeedsDiagnosis for further investigations.
[qa_04/2022]
The site is opening a pop up window on click. We can see that easily when testing on RDM.
<div class="col-xs-3 quick_menu" style="border: 2px solid #ff0000;">
<div class="quick_menu_icon">
<img src="/resources/knudorm/img/quick_menu4.png" onclick="selectMenu('menu_9764', 'SCRIPT', 'window.open(\'/dorm/popup/expence.knu\',\'\',\'width=550,height=750,scrollbars=yes,left=\'+(screen.availWidth/2-255)+\',top=0\')');">
</div>
<h3><a href="javascript:void(0);" onclick="selectMenu('menu_9764', 'SCRIPT', 'window.open(\'/dorm/popup/expence.knu\',\'\',\'width=550,height=750,scrollbars=yes,left=\'+(screen.availWidth/2-255)+\',top=0\')');" class="hhsc-nav-util-anchor">고지서출력</a></h3>
</div>
it relies on
selectMenu('menu_9764', 'SCRIPT', 'window.open(\'/dorm/popup/expence.knu\',\'\',\'width=550,height=750,scrollbars=yes,left=\'+(screen.availWidth/2-255)+\',top=0\')');
when first accessing the website on mobile. Firefox is asking if we want to prevent the site to open a pop-up window. If I choose Allow, the window is still not opening on mobile.
The function selectMenu
is called with an error.
function selectMenu(menuId, actionType, actionValue, menuType, domain) {
if (actionType==null||actionType=="") {
return;
}
if( domain == null || domain == "" || domain == undefined || domain == "undefind"){
domain = "";
}
if (actionType == "SCRIPT") {
//window.location.href = "javascript:" + actionValue+ ";";
document.frmAction.location.href = "javascript:" + actionValue+ ";";
}else {
if (menuType!=null&&menuType=='quick'&&actionValue.indexOf('http')==0) {
window.open(actionValue);
} else {
window.location.href = domain + actionValue;
}
}
return false;
}
The error is:
Uncaught TypeError: can't access property "location", document.frmAction is undefined
selectMenu http://knudorm.kangwon.ac.kr/js/engine/services/cnplus.dorm.base.header.js:75
this line precisely
document.frmAction.location.href = "javascript:" + actionValue+ ";";
document.frmAction
is undefined.
ooooh…
I didn't know this.
data:text/html,<!doctype html><html><iframe name="foo"></iframe></html>
calling
document.foo
on this document.
what?
The site could avoid to call document.frmAction.location
and calls directly document.location
. I'm moving this to needscontact.
Still I'm opening a bug on Bugzilla. https://bugzilla.mozilla.org/show_bug.cgi?id=1753380
URL: http://knudorm.kangwon.ac.kr/index.knu
Browser / Version: Firefox Mobile 94.0 Operating System: Android 8.0.0 Tested Another Browser: Yes Internet Explorer
Problem type: Site is not usable Description: Buttons or links not working Steps to Reproduce: when I clicked the button, it didn't work
View the screenshot
Browser Configuration
View console log messages
From webcompat.com with ❤️