Hi there,

I'm encountering a problem. On node submission page, I click on the HS droplist and choose an option such that a droplist of the child level pops out. After I reload the page, the HS droplist becomes disabled i.e. it shows to be grey in colour and unselectable.

Here is the major configuration of the HS:
Hierarchy: Single
Required
Save term lineage
Allow the user to choose a term from any level
Display the node count: Disabled
Resizable: Enabled
(the rest features are not enabled)

By the way, there is a date field (popup datepicker enabled) on the submission page so I wonder whether the problem is caused by the conflict between Date and HS modules. So if you also face the same problem even without the datepicker, please tell us.

Thank you.

Comments

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Active » Postponed (maintainer needs more info)

Is this in Firefox? Firefox does weird things with disabling form items when using the back button as well.

Tim Chan’s picture

Oh sorry i didn't even mention my test platform. Yes, the problem occurs on firefox but not IE8.

wim leers’s picture

Well then, I don't know the answer. You'll have to research Firefox' weird behavior in this domain. It's browser behavior, that I may be able to disable, but don't know how yet. It's not a bug in my code.

You should be able to reproduce similar problems on other forms, when using Firefox. Unfortunately.

dboulet’s picture

Experiencing this in FF as well, subscribe.

dboulet’s picture

Version: 5.x-3.0-rc7 » 6.x-3.x-dev

I found this very informative article about Firefox's autocomplete feature: http://www.ryancramer.com/journal/entries/radio_buttons_firefox/. It explains how the feature gets confused when form items are added dynamically to page. I was able to disable the autocomplete feature by adding this code to hierachical_select.js:

Drupal.behaviors.HierarchicalSelect = function (context) {
if ($.browser.mozilla) {
  // Turn off autocomplete to fix bug
  $('.hierarchical-select-wrapper').parents('form').attr('autocomplete', 'off');
}
...
wim leers’s picture

Title: HS droplist becomes disabled after refreshing page » HS select becomes disabled after refreshing page
Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Very interesting, dboulet, thanks! Will be committed soon! :)

wim leers’s picture

Title: HS select becomes disabled after refreshing page » HS select becomes disabled after refreshing page in Firefox
Status: Reviewed & tested by the community » Fixed

Committed. I put it in a better place though.

D6: http://drupal.org/cvs?commit=243268
D5: http://drupal.org/cvs?commit=243270

Status: Fixed » Closed (fixed)

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

WorldFallz’s picture

Issue summary: View changes

Seems something has changed with firefox-- this not only seems not required, it's actually causing a bug now.

Console error: TypeError: $.browser is undefined

Simply commenting out:

if ($.browser.mozilla) {
  $('#hierarchical-select-'+ hsid +'-wrapper').parents('form').attr('autocomplete', 'off');
}

in hierarchical_select.js seems to fix it with no ill effects.

WorldFallz’s picture