Fix new url field focus bug (#194)

Closes TryGhost/Ghost#7140

* Now checks to see if it is new or not before editing the url
This commit is contained in:
David Balderston 2016-08-10 07:31:16 -07:00 committed by Austin Burdine
parent 98892c6934
commit 1a91c1b2ed

View File

@ -131,7 +131,7 @@ export default TextField.extend(InvokeActionMixin, {
url = url.replace(baseUrlParts.pathname.slice(0, -1), '');
}
if (url !== '') {
if (url !== '' || !this.get('isNew')) {
if (!url.match(/^\//)) {
url = `/${url}`;
}