This includes many minor adjustments to a wide array of core files to replace shorthands with full declarations.
Follow-up to [50001], [50270], [50367].
Props Clorith, hellofromTonya, peterwilsoncc, adamsilverstein, aristath.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50420
git-svn-id: http://core.svn.wordpress.org/trunk@50031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
To be able to disable jQuery Migrate as step 3 of updating the jQuery version shipped with WordPress, all `JQMIGRATE` warnings in the browser console will have to be addressed.
This includes many minor adjustments to a wide array of core files.
Follow-up to:
* Step 1: Disabling jQuery Migrate 1.4.1 in WordPress 5.5: [48323], [48324]
* Step 2: Updating jQuery to 3.5.1 and adding jQuery Migrate 3.3.x in WordPress 5.6: [49101], [49338], [49615], [49649]
Props Clorith, azaozz.
See #51812.
Built from https://develop.svn.wordpress.org/trunk@50001
git-svn-id: http://core.svn.wordpress.org/trunk@49702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Many variables in the JavaScript were defined in the global scope without being explicitly assigned to the window. When built with Webpack, the code gets encapsulated in anonymous functions and those implicit globals get assigned to the wrong scope. This patch prevents that from happening.
Fixes#44371. See #43731.
Built from https://develop.svn.wordpress.org/trunk@43577
git-svn-id: http://core.svn.wordpress.org/trunk@43406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.
The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.
Props adamsilverstein, herregroen, omarreiss, pento.
Fixes#44361.
Built from https://develop.svn.wordpress.org/trunk@43347
git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Remove the calls to getBookmark() and moveToBookmark() in IE. This is handled automatically when blurring and focusing the editor.
- When inserting a link, move it out of the caret position element. If not, it may be removed with that element on clean-up before save.
Fixes#38335.
Built from https://develop.svn.wordpress.org/trunk@38808
git-svn-id: http://core.svn.wordpress.org/trunk@38751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Add role=dialog and an aria-labelledby attribute to the modal container.
- Change the modal title to h1.
- Remove one ` ` that gets read out as `blank` by screen readers.
- Replace the Cancel link with a button.
- Clean up unused CSS.
Props afercia.
Fixes#30468.
Built from https://develop.svn.wordpress.org/trunk@36991
git-svn-id: http://core.svn.wordpress.org/trunk@36958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Add audible confirmation when a link has been selected or inserted in the editor for both the inline dialog and the modal.
- Do not auto-search when the URL field is empty or already contains an URL.
- Remove a few redundant `tabindex`.
Props afercia, azaozz.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36984
git-svn-id: http://core.svn.wordpress.org/trunk@36951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Fix in IE (again). Remove setting/getting placeholders, pass the link node instead.
- In the inline dialog: when the selected text looks like URL or email, pre-fill the URL field with it (same as in the modal).
- Fix setting the name of the main button in the modal: Add Link or Update.
- In the modal when clicking Update remove the link if the URL field is empty. That matches the inline dialog behaviour. Otherwise the modal remains open, nothing happens when clicking the Update button there.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36747
git-svn-id: http://core.svn.wordpress.org/trunk@36714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Fix applying the changes when pressing the Enter key in Firefox. No longer inserts new paragraph in the editor.
- Fix empty check when getting text from the dialog.
- Always focus the URL field when opening the dialog.
- Add back the keydown events in the modal.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36743
git-svn-id: http://core.svn.wordpress.org/trunk@36710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36677
git-svn-id: http://core.svn.wordpress.org/trunk@36644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Fix passing values to the (old) modal on open when non-linked text is selected and Advanced is clicked before pasting an URL.
- When the user has selected text partially including a link and opens the editing dialog, auto-select the link only. Helps when a linked word is selected by double-clicking.
- Remove all placeholders on saving.
- Do not add undo level on inserting link placeholder.
- Remove the placeholder when canceling from the modal.
See #33301.
Built from https://develop.svn.wordpress.org/trunk@36602
git-svn-id: http://core.svn.wordpress.org/trunk@36569 1a063a9b-81f0-0310-95a4-ce76da25c4cd