Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the user starts typing in the, for example, content type name field, it shows previous entered values (standard browser feature). If the user selects one of this and then click the tab key, the machine name doesn't update correctly.
Comment | File | Size | Author |
---|---|---|---|
#18 | 946118-18-add-input-event.patch | 680 bytes | dcam |
#8 | 946118-add_input_event.patch | 665 bytes | lyricnz |
#6 | add_input_event.patch | 730 bytes | droplet |
#4 | Firefox mouse, not updating machine name | 28.52 KB | Rory |
#4 | Safari tab, not updating machine name | 26.39 KB | Rory |
Comments
Comment #1
yched CreditAttribution: yched commentedI don't think this qualifies as 'major'.
+ I'm not sure there's anything that can be done about it. I think I read somewhere that browser's autocomplete did not trigger the 'change' event.
Maybe update the machine name on blur, then ?
Comment #2
Rory CreditAttribution: Rory commentedThe machine name updates accepting the auto-complete suggestion using the arrow keys and Enter key (Firefox 9.0.1 / Chrome 16.0.912.75).
But it does not update when accepting the auto-complete suggestion with the mouse (Firefox / Chrome) or tabbing to the next field (Safari).
Also if the form validation fails, the machine name does not update after that.
Comment #3
nod_Works for me (on FF with tab+enter and mouse click) on vocabulary add form.
Is this about the behavior after clicking the (edit) link ? because I agree it's pretty unfriendly once you click on that.
Comment #4
Rory CreditAttribution: Rory commentedIt's about the Form API in Drupal 7.x (or 8.x) I think.
@_nod -> The tab only doesn't work in Safari, which is more of an issue than in Firefox because tab is how you (predominantly I assume) select the auto-complete in Safari.
I tried the vocabulary add form, i.e. 'Structure' > 'Taxonomy' > 'Add vocabulary'... but still seeing what I mentioned at #2.
Not sure how the mouse in Firefox updated the machine name in Firefox, for you. I did notice that if I've used the mouse in Firefox (to select the auto-complete using left-click) and it hasn't updated the machine name, by right-clicking anywhere in the window afterwards the machine name will update. This updating of the machine name with the right-click only works once per form page load, i.e. to see it again, reload the page and repeat. It doesn't fix the issue, it's just something strange I thought to mention.
Comment #5
yched CreditAttribution: yched commentedI don't think @rvilar intended to assign to himself
Comment #6
droplet CreditAttribution: droplet commented1. type a, trigger auto-complete suggestion
2. mouse, select one
no changes.
It's only trigger input event.
Comment #7
nod_Need reroll.
Comment #8
lyricnz CreditAttribution: lyricnz commentedReroll
Comment #9
PawelR CreditAttribution: PawelR commentedIs it still an issue for D8?
I just tested D8 in firefox and chrome but I couldn't recreate the issue (fresh D8 without applying this patch).
However I did recreate it in D7 using the same steps: started typing then clicked one of items suggested by the browser - machine name in D7 was exactly what I typed in (shorter that browser suggestion) but in D8 it was full text suggested by the browser.
Comment #10
droplet CreditAttribution: droplet commentedYes. still a problem.
no keydown has been triggered.
Comment #11
bkonetzny CreditAttribution: bkonetzny commentedPatch from #8 works and also fixed the behaviour when clicking the remove/cancel icon in the input field (IE10 only), which didn't work without this patch.
Comment #12
webchickCommitted and pushed to 8.x. Thanks!
Comment #13
xjm#8: 946118-add_input_event.patch queued for re-testing.
Comment #15
droplet CreditAttribution: droplet commentedrepo has updated, test failed is normal. switch to D7
Comment #16
droplet CreditAttribution: droplet commentedComment #17
saltednutupdating tags
Comment #18
dcam CreditAttribution: dcam commentedBackported #8 to D7.
Comment #19
droplet CreditAttribution: droplet commentedstraight forward, a quick fix. RTBC :)
Comment #20
David_Rothstein CreditAttribution: David_Rothstein commentedThis didn't actually fix the bug for me in my version of Safari, but then again my version of Safari is old and I never use it. So if it fixes it for some people I guess that's good enough.
Committed to 7.x - thanks! http://drupalcode.org/project/drupal.git/commit/83c4188