Fixing pusher username uncontrolled input; Adding default wide scrollbars (false)
This commit is contained in:
@ -77575,6 +77575,7 @@ var state = {
|
||||
smooth_scrolling_enabled: true,
|
||||
hotkeys_enabled: true,
|
||||
allow_reporting: true,
|
||||
wide_scrollbar_enabled: false,
|
||||
window_focus: true,
|
||||
slim_mode: false,
|
||||
selected_tracks: [],
|
||||
@ -81168,7 +81169,7 @@ var Settings = function (_React$Component) {
|
||||
var changed = false;
|
||||
var state = this.state;
|
||||
|
||||
if (nextProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username') {
|
||||
if (nextProps.pusher.username && nextProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username') {
|
||||
state.pusher_username = nextProps.pusher.username;
|
||||
changed = true;
|
||||
}
|
||||
@ -81344,7 +81345,8 @@ var Settings = function (_React$Component) {
|
||||
onChange: function onChange(value) {
|
||||
return _this2.props.pusherActions.setUsername(value.replace(/\W/g, ''));
|
||||
},
|
||||
value: this.props.pusher.username }),
|
||||
value: this.state.pusher_username
|
||||
}),
|
||||
_react2.default.createElement(
|
||||
'div',
|
||||
{ className: 'description' },
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -100,7 +100,7 @@
|
||||
|
||||
// Release details
|
||||
// These are automatically injected to built HTML
|
||||
var build = "1560198302";
|
||||
var build = "1560716947";
|
||||
var version = "3.38.0";
|
||||
|
||||
// Construct the script tag
|
||||
|
||||
@ -47,6 +47,7 @@ let state = {
|
||||
smooth_scrolling_enabled: true,
|
||||
hotkeys_enabled: true,
|
||||
allow_reporting: true,
|
||||
wide_scrollbar_enabled: false,
|
||||
window_focus: true,
|
||||
slim_mode: false,
|
||||
selected_tracks: [],
|
||||
|
||||
@ -43,7 +43,7 @@ class Settings extends React.Component {
|
||||
var changed = false
|
||||
var state = this.state
|
||||
|
||||
if (nextProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username'){
|
||||
if (nextProps.pusher.username && nextProps.pusher.username != this.state.pusher_username && this.state.input_in_focus != 'pusher_username'){
|
||||
state.pusher_username = nextProps.pusher.username
|
||||
changed = true
|
||||
}
|
||||
@ -171,7 +171,8 @@ class Settings extends React.Component {
|
||||
<div className="input">
|
||||
<TextField
|
||||
onChange={value => this.props.pusherActions.setUsername(value.replace(/\W/g, ''))}
|
||||
value={this.props.pusher.username } />
|
||||
value={ this.state.pusher_username }
|
||||
/>
|
||||
<div className="description">
|
||||
A non-unique string used to identify this client (no special characters)
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user