From dc4bd1d2c9481ba5497e8436d09b47cd55798d21 Mon Sep 17 00:00:00 2001 From: Richard van Dijk Date: Mon, 28 Sep 2015 14:52:41 +0200 Subject: [PATCH] scroll messages to bottom + fill in default websocket URL For convenience. --- demo/demo.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demo/demo.js b/demo/demo.js index 5568707..2373369 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -30,6 +30,7 @@ Ext.define ('DEMO.view.OpenConnection', { var container = Ext.ComponentQuery.query('panel[title="' + url + '"] > container#messageCt')[0]; var messageBox = container.getEl().dom.getElementsByClassName("messageBox")[0]; messageBox.innerHTML += '> ' + data + '
'; + messageBox.scrollTop = messageBox.scrollHeight; } , close: function (ws) { var panel = Ext.ComponentQuery.query('panel[title="' + url + '"]')[0]; @@ -110,6 +111,7 @@ Ext.define ('DEMO.view.OpenConnection', { xtype: 'textfield' , anchor: '100%' , fieldLabel: 'URL' , + value: 'ws://localhost:9001' , labelAlign: 'top' , listeners: { specialKey: function (tf, evt) {