Open 2jfw opened 3 months ago
Running into this too. We load local HTML and us anchor tags to scroll the user to a specific section.
if (dir.exists) {
loadReference( paragraphReference);
}
protected function loadReference(bookmark:String):void
{
// If a reference window is already open, close it.
if (_refWindow !== null && _refWindow.initialized && !_refWindow.closed) {
_refWindow.close();
}
var dir:File = File.applicationDirectory;
dir = dir.resolvePath("assets");
dir = dir.resolvePath("html");
dir = dir.resolvePath(courseIdentifier);
dir = dir.resolvePath(referenceFileName);
// Open a new reference window
_refWindow = new HTMLWindow();
_refWindow.title = "HTML";
if((Capabilities.os.indexOf("Windows") >= 0)) {
_refWindow.bookmark = bookmark;
}
_refWindow.htmlFilePath = refUrl;
_refWindow.open();
}
On Mac the _refWindow.bookmark
causes it to load a white screen
When pointing to a file on a network drive, which contains a
#
character in the file path or filename and when the reference begins withfile:////
,nativePath
andurl
will be cut right before the#
.Attached below is a sample where this can be reproduced:
For filename2 :
file.nativePath
will be:\\networkDrive.com\test\Hash File
file.url
will befile:////networkDrive.com/test/Hash%20File%20
Having a folder name with a
#
will cut the name of the folder in the same manner.Assumption: I could imagine that the
file:////
will somehow trigger some kind of URI/URL parsing attempt where the#
hashtag indicates something like anAnchor
(HTML?) and gets ignored or cut. I'm not sure if this is working as intended.