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.

#18 946118-18-add-input-event.patch680 bytesdcam
PASSED: [[SimpleTest]]: [MySQL] 40,303 pass(es). View
#8 946118-add_input_event.patch665 byteslyricnz
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 946118-add_input_event.patch. Unable to apply patch. See the log in the details link for more information. View
#6 add_input_event.patch730 bytesdroplet
PASSED: [[SimpleTest]]: [MySQL] 34,461 pass(es). View
#4 Firefox mouse, not updating machine name28.52 KBRory
#4 Safari tab, not updating machine name26.39 KBRory
Members fund testing for the Drupal project. Drupal Association Learn more


yched’s picture

Priority: Major » Normal

I 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 ?

Rory’s picture

The 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.

nod_’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +JavaScript

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.

Rory’s picture

It'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.

yched’s picture

Assigned: rvilar » Unassigned

I don't think @rvilar intended to assign to himself

droplet’s picture

Status: Active » Needs review
Issue tags: +needs backport to D7
730 bytes
PASSED: [[SimpleTest]]: [MySQL] 34,461 pass(es). View

1. type a, trigger auto-complete suggestion
2. mouse, select one

no changes.

It's only trigger input event.

nod_’s picture

Status: Needs review » Needs work
Issue tags: +js-novice

Need reroll.

lyricnz’s picture

Status: Needs work » Needs review
665 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 946118-add_input_event.patch. Unable to apply patch. See the log in the details link for more information. View


PawelR’s picture

Is 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.

droplet’s picture

Yes. still a problem.

no keydown has been triggered.

mousemove clientX=228, clientY=240 » input#edit-name.form-text
mousemove clientX=228, clientY=249 » input#edit-name.form-text
mousemove clientX=228, clientY=256 » input#edit-name.form-text
mouseout clientX=228, clientY=266 » input#edit-name.form-text
input » input#edit-name.form-text

bkonetzny’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +SprintWeekend2013

Patch 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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

xjm’s picture

Status: Fixed » Needs review
Issue tags: -JavaScript, -needs backport to D7, -js-novice, -SprintWeekend2013

#8: 946118-add_input_event.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +JavaScript, +needs backport to D7, +js-novice, +SprintWeekend2013

The last submitted patch, 946118-add_input_event.patch, failed testing.

droplet’s picture

Version: 8.x-dev » 7.x-dev

repo has updated, test failed is normal. switch to D7

droplet’s picture

Status: Needs work » Patch (to be ported)
brantwynn’s picture

Issue tags: -SprintWeekend2013

updating tags

dcam’s picture

Status: Patch (to be ported) » Needs review
680 bytes
PASSED: [[SimpleTest]]: [MySQL] 40,303 pass(es). View

Backported #8 to D7.

droplet’s picture

Status: Needs review » Reviewed & tested by the community

straight forward, a quick fix. RTBC :)

David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed

This 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

Status: Fixed » Closed (fixed)
Issue tags: -JavaScript, -needs backport to D7, -js-novice

Automatically closed -- issue fixed for 2 weeks with no activity.