From b3ef9e35e784d587c531cbc1b20f4375532eb51d Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 5 Dec 2022 22:36:03 +1100 Subject: [PATCH] Fix rendering VTX frames, fix setting cf to null when navigating away from a frame with fields --- load/frame-page.js | 2 +- load/frame-viewdata.js | 4 ++-- main.js | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/load/frame-page.js b/load/frame-page.js index 3bff0a7..6d35e83 100644 --- a/load/frame-page.js +++ b/load/frame-page.js @@ -110,7 +110,7 @@ function PageFrame() { Object.defineProperty(this,'pageownerlogo', { get: function() { - return base64_decode(pageOwner(this.frame).logoans); + return base64_decode(this.settings.ext === 'tex' ? pageOwner(this.frame).logoans : pageOwner(this.frame).logovtx); } }) } diff --git a/load/frame-viewdata.js b/load/frame-viewdata.js index d4af755..74a1e41 100644 --- a/load/frame-viewdata.js +++ b/load/frame-viewdata.js @@ -2,10 +2,10 @@ var FRAME_VIEWDATA = (1<<2); var VIEWDATA_LEFT = ascii(0x08); var VIEWDATA_RIGHT = ascii(0x09); -var VIEWDATA_DOWN = ascii(0x0a); +var VIEWDATA_DOWN = ascii(0x0a); // \n var VIEWDATA_UP = ascii(0x0b); var VIEWDATA_CLS = ascii(0x0c); -var VIEWDATA_CR = ascii(0x0d); +var VIEWDATA_CR = ascii(0x0d); // \r var VIEWDATA_CON = ascii(0x11); var VIEWDATA_COFF = ascii(0x14); var VIEWDATA_HOME = ascii(0x1e); diff --git a/main.js b/main.js index 86c8f9d..a5d1a3e 100644 --- a/main.js +++ b/main.js @@ -1048,6 +1048,9 @@ while(bbs.online) { // Load frame case ACTION_RELOAD: + // Clear our current field + cf = null; + log(LOG_DEBUG,'- ACTION_RELOAD: ['+(next_page ? pageStr(next_page) : '')+']'); console.line_counter = 0; // @todo fix to suppress a pause that is occurring before clear()