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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

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
FileSize
730 bytes

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
FileSize
665 bytes

Reroll

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)
saltednut’s picture

Issue tags: -SprintWeekend2013

updating tags

dcam’s picture

Status: Patch (to be ported) » Needs review
FileSize
680 bytes

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.