ID:2300416
 
Resolved
BYOND Version:512.1388
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 60.0.3112.113
Applies to:BYOND/help/ref
Status: Resolved

This issue has been resolved.
Descriptive Problem Summary:

When I open index.html for the ref, the actual documentation only displays for 1-2 seconds before disappearing

Numbered Steps to Reproduce Problem:

1. Open index.html in C:\Program Files (x86)\BYOND\help\ref
2. Watch as the documentation disappears before your eyes

Code Snippet (if applicable) to Reproduce Problem:
fuck


Expected Results:
For it to not disappear

Actual Results:
It disappears

Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?

When does the problem NOT occur?
Before 512

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:
Open info.html but you don't get the fancy tree thing on the left.

Obligatory screenshot:

this is apparently intentional now. ctrl+f or click through tree to find what you're lookin for
Yeah, I click on the tree and it just disappears again after a few seconds
Can you show a .gif perhaps of clicking the tree causing a problem? I'd like to see what that looks like.

The right pane clearing out on load is normal.
Does Chrome's developer tools give you any error messages that might be helpful?
Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
at HTMLFrameElement.onload (file:///C:/Program%20Files%20(x86)/BYOND/help/ref/index.html#/proc/abs:22:109)
This appears to be a Chrome bug--if not two of them. Not surprising because Chrome is a piece of hot trash.

Chrome is reloading the entire page when it navigates, even though the hash is the only element of the URL that's changing. Reloading the entire page is incorrect behavior. It was surprisingly hard to find info on this, but apparently the bonehead bug stems from Chrome's improper handling of framesets.

I'm working on a workaround for this now, which I can get into the 512 reference and then work into the live 511 reference.
hot piece of trash

You're one to talk.
In response to Monster860
Chrome really is sucky. The only things they've really done right IMO are accelerating the pace of competing browsers' upgrades, and not being Microsoft. Unfortunately Mozilla has decided to follow Chrome's terrible UI decisions and pretty soon their extensions--the lifeblood of Firefox--will be forced to be nearly every bit as terrible as Chrome's.

Fun fact, BTW: the bug report I found on the frameset reloading behavior, which has existed in Webkit browsers since apparently forever and is low-hanging fruit to fix, has been observed in just one other browser: IE 5.5.

I've been working on a workaround, which is to use two iframes in place of the frameset and roll my own adjustable divider. I spent a lot of time testing out the changes in both Chrome and Firefox.
Lummox JR resolved issue
The new divider breaks in Internet Explorer. The whole page hangs right after you stop dragging it.

The error:
SCRIPT438: Object doesn't support property or method 'remove'
index.html (66,4)


.remove() simply isn't supported even by IE 11.

Here is a nice polyfill recommended by Mozilla.
In response to Multiverse7
Why are you using internet explorer.
In response to PJB3005
Normally I wouldn't, but that's what Dream Seeker uses. It's kind of sad when BYOND is unable to properly display its own language reference. I'm forcing it to do that, and this is yet another issue getting in the way.
In response to Multiverse7
...Since when can DS open the language documentation?

And why would you do this
In response to PJB3005
Since I looked at it and decided to make it work.

Why wouldn't I do that? I find it rather amusing, and the idea of having an interactive reference tied directly into native DM just sounds way too fun.
classList.js should also be included to fix issues with the contents tree not collapsing right in Internet Explorer. There's no reason not to, since that one is literally public domain.

Here is a basic demo I put together to prove that the DM Reference can be made to work in Dream Seeker's browser control. Both of the fixes I linked above are included. I left a lot of comments you can read about what the problems are with Dream Seeker's browser.

I hope this will be helpful. Let me know if it works or doesn't work.
The new reference fix for IE seems to be working, but has missed Dream Seeker, which in my case has Trident 8.0, meaning it's stuck in compatibility mode.

ref/contents.html, line 75 is:
if(navigator.userAgent.match(/Trident\/7\./)) {

What it should be:
if(navigator.userAgent.match(/Trident\/[78]\./)) {

It's a simple change to match 7 or 8.
The overview table tooltips in skinparams.html do not function within Dream Seeker's browser control. This is due to getAttribute() and setAttribute() not functioning as expected.

The fill_overview() function on line 1245 uses these functions:
  function fill_overview() {
var table = document.getElementById('overviewtable');
for(var i=1; i<table.rows.length; ++i) {
for(var j=1; j<table.rows[i].cells.length; ++j) {
var cell = table.rows[i].cells[j];
if(!cell.innerHTML || cell.innerHTML == '&nbsp;') continue;
for(node=cell.firstChild; node; node=node.nextSibling) {
if(node.tagName) continue;
var link = document.createElement('a');
var text = node.nodeValue;
cell.insertBefore(link, node);
link.appendChild(document.createTextNode(text));
link.href = '#';
if(/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) {
link.onmouseover = new Function("show_param_info('" + cell.getAttribute('class') + "','" + text + "', event)");
link.onmouseout = hide_param_info;
link.onclick = falsefunc;
}
else {
link.setAttribute('onMouseOver' ,"show_param_info('" + cell.getAttribute('class') + "','" + text + "', event)");
link.setAttribute('onMouseOut' , "hide_param_info()");
link.setAttribute('onClick' , "return false");
}
cell.removeChild(node);
node = link;
}
}
}
}


Here is a more efficient and standard version that functions the same for all current browsers, as well as ancient versions of Internet Explorer, including Dream Seeker's browser control:
  function fill_overview() {
var table = document.getElementById('overviewtable');
for(var i=1; i<table.rows.length; ++i) {
for(var j=1; j<table.rows[i].cells.length; ++j) {
var cell = table.rows[i].cells[j];
if(!cell.innerHTML || cell.innerHTML == '&nbsp;') continue;
for(node=cell.firstChild; node; node=node.nextSibling) {
if(node.tagName) continue;
var link = document.createElement('a');
var text = node.nodeValue;
cell.insertBefore(link, node);
link.appendChild(document.createTextNode(text));
link.href = '#';
if(link.addEventListener) {
link.addEventListener("mouseover", (function(c, t) { return function(e) { e = e || event; show_param_info(c, t, e); }})(cell.className, text));
link.addEventListener("mouseout", hide_param_info);
link.addEventListener("click", falsefunc);
}
else if(link.attachEvent) {
link.attachEvent("onmouseover", (function(c, t) { return function(e) { e = e || event; show_param_info(c, t, e); }})(cell.className, text));
link.attachEvent("onmouseout", hide_param_info);
link.attachEvent("onclick", falsefunc);
}
cell.removeChild(node);
node = link;
}
}
}
}

Login to reply.