#50499 closed enhancement (fixed)
Slug field should not autocorrect in Quick Edit view
Reported by: | swb1192 | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.5 |
Component: | Quick/Bulk Edit | Keywords: | has-patch has-testing-info commit |
Focuses: | Cc: |
Description (last modified by )
When using the Quick Edit view on a Posts admin page, autocorrect is enabled when editing the slug. This may result in the unintended slugs.
By using spellcheck="false" in the input field, browsers including Safari will no longer autocorrect or spell check the slug field.
Attachments (3)
Change History (29)
#1
follow-up:
↓ 2
@
4 years ago
Hi there, welcome to WordPress Trac! Thanks for the ticket and the patch.
Just noting that per MDN web docs, spellcheck="false"
appears to be the correct value to disable the check, rather than spellcheck="off"
.
#2
in reply to:
↑ 1
@
4 years ago
Replying to SergeyBiryukov:
Hi there, welcome to WordPress Trac! Thanks for the ticket and the patch.
Just noting that per MDN web docs,
spellcheck="false"
appears to be the correct value to disable the check, rather thanspellcheck="off"
.
Thanks for catching that! I wrote "off" in the description erroneously, but the patch has the correct "false".
#4
@
4 years ago
- Milestone changed from Awaiting Review to 5.8
Just noting that spellchecking was previously enabled for the post title field on Edit Post screen in classic editor, see [30350] / #30338. That appears to be the only instance of the spellcheck
attribute in core at the moment.
This ticket suggests disabling it for the post slug field in Quick Edit on Posts screen.
I don't have a strong preference either way here, moving to the milestone for discussion.
#5
@
4 years ago
Since slugs are by intent likely not going to pass a spell-check, since it's just a bunch of words combined into a long string, this seems like a reasonable enhancement to avoid minor confusion without any obvious drawbacks (especially considering WordPress will auto-generate the slug based on the title, which is what I suspect will be used in the majority of situations).
#6
@
4 years ago
- Milestone changed from 5.8 to 5.9
Today is feature freeze day for 5.8.
I'd like to allow a bit more time in order to see a bit more feedback on this one before making the change, so I'm going to punt to 5.9.
This ticket was mentioned in Slack in #core by scottbuscemi. View the logs.
3 years ago
#10
follow-up:
↓ 11
@
3 years ago
@swb1192 this seems like a worthwhile and reasonable enhancement (essentially concurring with @SergeyBiryukov's assessment). Are there any other places you know of that might also benefit from this same treatment? If not, then this seems good to go for 5.9 from my view.
#11
in reply to:
↑ 10
@
3 years ago
@JeffPaul Thanks Jeff - good point! This could also be added to the URL Slug/permalink field in the block editor. I can provide a diff for that too.
#12
@
3 years ago
@swb1192 that block editor change is probably best filed upstream at github.com/wordpress/gutenberg to get into the Gutenberg plugin and eventually back into core.
#13
@
3 years ago
@JeffPaul Ah, got it. I'll keep pushing for this to be in 5.9 then. Not sure how to get the right visibility of this ticket.
#14
@
3 years ago
GB33612 is open for discussion about the block editor field.
The spellcheck attribute can also be added to the Classic Editor, and I included it in my patch for fixing the missing label for that input on #53725.
This ticket was mentioned in Slack in #core by sabernhardt. View the logs.
3 years ago
#19
@
3 years ago
- Keywords needs-testing added
@swb1192 I've labeled the latest patch from @sabernhardt as needs-testing
, but the upstream PR landed in Gutenberg 11.3 and will be part of the merge into core in the 5.9 release cycle.
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#23
@
3 years ago
- Keywords needs-testing removed
Test Report
TL;DR
Patch is successful. Ready for commit
.
Env
- WordPress 5.9-alpha-20211109.232952
- Chrome 95.0.4638.69
- Windows 10
- Theme: Twenty Twenty One
- Gutenberg Editor
- Plugins: None
Steps to test
- Navigate to Posts.
- Hover over a post and click Quick Edit.
- Right-click on the slug field and click Inspect (Element).
- The selected line should read:
<input type="text" name="post_name" value>
- Apply the patch.
- Repeat steps 1-3.
- The selected line should now read:
<input type="text" name="post_name" value autocomplete="off" spellcheck="false">
Additional testing
- Navigate to Posts.
- Hover over a post and click Quick Edit.
- Enter a new slug, spelled incorrectly.
- Click Update.
- Refresh.
- Hover over the same post and click Quick Edit.
- Empty its slug field.
- Type the first character of the slug you set in (3).
Before the patch, it should predict that you want the previous slug you typed.
- Apply the patch.
- Repeat steps 1-7.
After the patch, it shouldn't predict anything.
Results
- Patch: 50499.diff
- Before patch: The slug field does not have
autocomplete
set tooff
andspellcheck
set tofalse
. It autocompletes and autocorrects in browsers that support these features. - After patch: The slug field has
autocomplete
set tooff
and spellcheck set tofalse
. It does not autocomplete or autocorrect in browsers that support these features.
#25
@
3 years ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 52092:
spellcheck disabled for slug field