|
|
@@ -55,6 +55,7 @@ class WelcomePage extends AbstractWelcomePage {
|
|
55
|
55
|
'welcome-page-additional-content-template');
|
|
56
|
56
|
|
|
57
|
57
|
// Bind event handlers so they are only bound once per instance.
|
|
|
58
|
+ this._onFormSubmit = this._onFormSubmit.bind(this);
|
|
58
|
59
|
this._onRoomChange = this._onRoomChange.bind(this);
|
|
59
|
60
|
this._setAdditionalContentRef
|
|
60
|
61
|
= this._setAdditionalContentRef.bind(this);
|
|
|
@@ -121,7 +122,7 @@ class WelcomePage extends AbstractWelcomePage {
|
|
121
|
122
|
<div id = 'new_enter_room'>
|
|
122
|
123
|
<form
|
|
123
|
124
|
className = 'enter-room-input'
|
|
124
|
|
- onSubmit = { this._onJoin }>
|
|
|
125
|
+ onSubmit = { this._onFormSubmit }>
|
|
125
|
126
|
<FieldTextStateless
|
|
126
|
127
|
autoFocus = { true }
|
|
127
|
128
|
id = 'enter_room_field'
|
|
|
@@ -153,6 +154,19 @@ class WelcomePage extends AbstractWelcomePage {
|
|
153
|
154
|
);
|
|
154
|
155
|
}
|
|
155
|
156
|
|
|
|
157
|
+ /**
|
|
|
158
|
+ * Prevents submission of the form and delagates join logic.
|
|
|
159
|
+ *
|
|
|
160
|
+ * @param {Event} event - The HTML Event which details the form submission.
|
|
|
161
|
+ * @private
|
|
|
162
|
+ * @returns {void}
|
|
|
163
|
+ */
|
|
|
164
|
+ _onFormSubmit(event) {
|
|
|
165
|
+ event.preventDefault();
|
|
|
166
|
+
|
|
|
167
|
+ this._onJoin();
|
|
|
168
|
+ }
|
|
|
169
|
+
|
|
156
|
170
|
/**
|
|
157
|
171
|
* Overrides the super to account for the differences in the argument types
|
|
158
|
172
|
* provided by HTML and React Native text inputs.
|