Fix project renaming in safari #450
Reference in New Issue
Block a user
Delete Branch "kurt/434-rename-projects-safari"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #434
basically the flow i was going for was that if you loose focus the name is reverted.
https://user-images.githubusercontent.com/29681384/129016133-98391d12-331d-4a83-ad82-5753831202a4.mov
but because clicking the rename button is also loosing focus but onblur is called before the button's on click handler i was using the
relatedTargetevent property to tell if it was just loosing focus or loosing focus because the button was pressed, but safari doesn't seem to support that property so using a good old time out instead to allow the button handle a chance to fire, and since it redirects the user anyway the fact thatsetNewTitleetc is still called is not a problem.hmmm maybe a less hacky option would be to turn this into a mini form with the button being the form submisson . . not sure and couldn't be bothered tbh.
Nice find 🔎