Created
February 18, 2016 01:11
-
-
Save freaktechnik/c6d84b4c78002106af7b to your computer and use it in GitHub Desktop.
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
# HG changeset patch | |
# User Martin Giger <martin@humanoids.be> | |
# Parent f23b538a3e3bb674e22bab5ef6b8d816531b155f | |
diff --git a/chat/content/convbrowser.xml b/chat/content/convbrowser.xml | |
--- a/chat/content/convbrowser.xml | |
+++ b/chat/content/convbrowser.xml | |
@@ -773,16 +773,28 @@ | |
// The content area was resized and auto-scroll is enabled, | |
// make sure the last inserted element is still visible | |
this._scrollToElement(this._lastElement); | |
} | |
]]> | |
</body> | |
</method> | |
+ <method name="browserLoad"> | |
+ <parameter name="event"/> | |
+ <body> | |
+ <![CDATA[ | |
+ if (event.target.tagName.toLowerCase() === "img" && | |
+ this._autoScrollEnabled && this._lastElement) { | |
+ this._scrollToElement(this._lastElement); | |
+ } | |
+ ]]> | |
+ </body> | |
+ </method> | |
+ | |
<!-- nsIObserver implementation --> | |
<method name="observe"> | |
<parameter name="aSubject"/> | |
<parameter name="aTopic"/> | |
<parameter name="aData"/> | |
<body> | |
<![CDATA[ | |
if (aTopic != "nsPref:changed") | |
@@ -901,16 +913,18 @@ | |
this._nextPendingMessageIndex = 0; | |
this._pendingMessagesDisplayed = 0; | |
this._displayPendingMessagesCalls = 0; | |
this._sessions = []; | |
if (this.progressBar) | |
this.progressBar.hidden = true; | |
Services.obs.notifyObservers(this, "conversation-loaded", null); | |
+ | |
+ this.contentDocument.getElementById("Chat").addEventListener("load", this.browserLoad.bind(this), true); | |
} | |
]]> | |
</body> | |
</method> | |
<method name="onProgressChange"> | |
<parameter name="aProgress"/> | |
<parameter name="aRequest"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment