FIX: lapp browser when typing URL without https scheme it doesnt work (closes #732)

This commit is contained in:
Overtorment 2019-11-18 23:54:40 +00:00
parent fdded0769f
commit b5339f2aa7

View file

@ -396,7 +396,11 @@ export default class Browser extends Component {
editable
onSubmitEditing={() => {
Keyboard.dismiss();
this.setState({ url: this.state.stateURL });
let url = this.state.stateURL;
if (!url.toLowerCase().startsWith('http://') && !url.toLowerCase().startsWith('https://')) {
url = 'https://' + url;
}
this.setState({ url });
}}
/>
</View>