views:

53

answers:

1

I have a set of custom PHP forms within a set of Drupal pages (not generated through Drupal forms API - I won't explain why I'm not just using Drupal for these forms here - a tad complicated) with text entry fields won't allow keyboard input - but will allow copy and paste. They populate correctly with default values, but just won't let you type. An exception is a text field which has TinyMCE enabled - Text entry is fine here, unless the TinyMCE script isn't loaded, in which case the text field disallows type as well.

The problem arose after adjusting Jquery Update to allow the latest 1.4.2 library to be loaded unless on a page with 'admin' or 'edit' in the URL, in which case the current Jquery Update 2.x library would be loaded, to leave all admin area behaviours functioning.

Through a process of elimination, I've found that the JStree plugin I am using for some nested checkbox lists in my custom forms is causing the problem. When disabled, text entry is fine. Strangely, the problem occurs in fields outside of the container where JStree is enabled (by use of a specific selector), and even effects fields in other custom PHP forms on different pages, where there are no JStree controlled elements. I've tried adding classes to both the text inputs and form containers to mimic those used in Drupal generated forms as closely as possible, to no avail. Drupal forms remain untouched by this weird conflict. I've tested the issue in a stripped down form in MAMP, outside of Drupal, and text input fields are uneffected by existing in the same form as a JStree checkbox list.

If this sounds familiar to anyone, or if someone can offer a method to further trouble-shoot the issue, I would be hugely appreciative.

A: 

I've temporarily soved the issue by re-ordering the script calls in my theme .info file. I now load the copy of the Jquery library that comes with JStree above all other scripts. I believe there may be a patch for Jquery Update that addresses correct script ordering which I will look into.

Issue closed.

bulkhead