twinejs icon indicating copy to clipboard operation
twinejs copied to clipboard

Adding story formats repeatedly tries back URLs if you type in the field

Open klembot opened this issue 3 years ago • 2 comments
trafficstars

The "Add story format" panel repeatable tries to resolve the URL after each character is entered into the field, so simply typing https://t or https://tw is enough to cause (an) instance(s) of the following error...

GET <url> net::ERR_NAME_NOT_RESOLVED

...and possible the following error as well...

Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure script '<URL>'. This request has been blocked; the content must be served over HTTPS

,,,all depending on how slow you type or if you pause while typing.

If I tried to overcome the above issue by copy-n-pasting a valid domain like https://twine2.neocities.org/ into the field I get a Cross-Origin Read Blocking (CORB) blocked cross-origin warning before I can type the rest of the URL.

I would recommend not trying to resolve the URL until the end-user selects the "Add" button.

Originally posted by @greyelf in https://github.com/klembot/twinejs/issues/1236#issuecomment-1205799026

klembot avatar Aug 05 '22 23:08 klembot

p3 because many users don't do this (based on my totally unscientific opinion) and I'd guess most are copy/pasting a URL rather than typing it in character by character.

klembot avatar Aug 05 '22 23:08 klembot

2.5 partially fixes this behaviour, so it might be closable. The partial URLs are still tried, but the error no longer displays.

hituro avatar Aug 29 '22 11:08 hituro