-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(outlook.com): fix positioning of underlines on outlook.com
This fixes an issue with the underlines in emails on outlook.com appearing above the words. The root cause was that outlook.com changed the DOM structure, adding padding to the contenteditable div that was the normal parent as well as adding another containing div with no `position` attribute to the hierarchy. The new intermediate was being used as the parent for calculating coords but the coords of the words were relative to the contenteditable div. Using offsetParent instead of parentNode skips the intermediate div and makes things line up properly. fixes #134
- Loading branch information
Showing
3 changed files
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Work-around for jsdom not supporting offsetParent | ||
// https://github.com/jsdom/jsdom/issues/1261 | ||
Object.defineProperty(HTMLElement.prototype, 'offsetParent', { | ||
get() { | ||
return this.parentNode; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters