Changes between Initial Version and Version 1 of Ticket #32412, comment 2
- Timestamp:
- 05/16/2015 06:05:47 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32412, comment 2
initial v1 1 I suggest the attached patch to deal with this case. I've m oved correctURL outside of init to be a method of wpLink, and I'm calling it inside mceUpdate. Alternatively, it can be called from inside the inputs.submit.click handler. There should be no issue with correction being applied twice, because the condition comparing the URL with correctedURL should stop it. It's good to keep the correction on paste or blur so the user is aware of the change that's being applied. This method also keeps the behaviour allowing the user to enter a non-protocol address if he repeats the entry after it's corrected.1 I suggest the attached patch to deal with this case. I've made correctURL a method of wpLink, and I'm calling it inside mceUpdate. (As an alternative, it could be called by the inputs.submit.click handler.) It's good to keep the correction on paste or blur of the URL input so the user is alerted to the change that's being applied. If mcdUpdate calls correctURL on a URL that's already been corrected, the condition comparing the URL with correctedURL should stop the second execution of the function. 2 2 3 This method also maintains the behaviour allowing the user to enter a non-protocol address if he repeats the entry after it's corrected. 4