Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to detect message direction when replying #30

Open
eyalroz opened this issue Aug 31, 2020 · 0 comments
Open

Error when trying to detect message direction when replying #30

eyalroz opened this issue Aug 31, 2020 · 0 comments
Assignees
Labels
bug Something isn't working resolved-on-development

Comments

@eyalroz
Copy link
Owner

eyalroz commented Aug 31, 2020

When replying to a message, but for some reason the displayed message's direction is unavailable (which itself may be a bug), we need to check the reply body's direction.

This currently fails, with an attempt to manipulate an object which shouldn't be undefined,, but somehow is.

Uncaught TypeError: obj is undefined
directionCheck chrome://bidimailui/content/bidimailui-common.js:643
setInitialDirection chrome://bidimailui/content/bidimailui-composer.js:721
NotifyComposeBodyReady chrome://bidimailui/content/bidimailui-composer.js:119
workaroundForcingTimeoutId chrome://bidimailui/content/bidimailui-composer.js:784
bidimailui-common.js:643:9

@eyalroz eyalroz added the bug Something isn't working label Aug 31, 2020
@eyalroz eyalroz self-assigned this Aug 31, 2020
eyalroz pushed a commit that referenced this issue Aug 31, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 2, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 2, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 5, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`

+  document.documentElement.setAttribute("platform",Services.appinfo.os);
eyalroz pushed a commit that referenced this issue Sep 7, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object (and the editor) is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* Specifically, we no longer need a time-out from whatever event listener we run; and we no longer register event listeners for "load" and "compose-window-reopen".
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI, in case it's unavailable.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`
* Renamed some event-listener and related functions.
eyalroz pushed a commit that referenced this issue Sep 7, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object (and the editor) is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* Specifically, we no longer need a time-out from whatever event listener we run; and we no longer register event listeners for "load" and "compose-window-reopen".
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI, in case it's unavailable.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`
* Renamed some event-listener and related functions.
eyalroz pushed a commit that referenced this issue Sep 7, 2020
* We used to employ a pretty shady method of ensuring the gMsgCompose object (and the editor) is ready for us to use. No longer! We now register a listener which is notified when the message body is ready - at which point gMsgCompose is usable. This listener is registered in the handler for the "compose-window-init" event. It's magic!
* Specifically, we no longer need a time-out from whatever event listener we run; and we no longer register event listeners for "load" and "compose-window-reopen".
* When calling the `directionCheck()` function on reply message bodies, we were - somehow - not passing the NodeFilter object. Crazy! That bug must have been manifesting for years.
* Trying to be nicer about adding a stylesheet (the quotebar fix) to the editor
* Dropped some commented-out code relevant to earlier TB and SM versions
* Some `let`'s-instead-of-`var`'s
* Avoiding some code duplication in `setInitialDirection()`
* The code we used to obtain the currently-loaded message's URI for a debugging message is no longer working... for now, just skipping the printing of the URI, in case it's unavailable.
* Remove some unnecessary newlines in `console.log()` calls
* Fixed out-of-date variable name in a `console.log()` debug message in `bidimailui-display-logic.js`
* Renamed some event-listener and related functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved-on-development
Projects
None yet
Development

No branches or pull requests

1 participant