The module in essence appears to work. However, in both IE7 and FF3 I have experienced problems where an event is fired to insert an image at the wrong time.
I edit a node. Then I scroll down to where my images and body field are. I select a suitable place in the content at which to insert the image. Then I wish to select an imagecache preset to insert. I click and release on the select box. This inserts an image. BZZZZT! Then I move the mouse down and click on my required preset. This ALSO inserts an image. Double BZZZZT! Then the next thing I would logically do is click "send to textarea", but by this point I've already got two images inserted of whatever size, so it all seems a bit moot really eh? :)
Looked at the JS, but I can't see any event handling stuff anyway - I looked at the widget template but nothing obvious jumped out at me I'm afraid.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | filefield_insert_click_handler.patch | 882 bytes | quicksketch |
Comments
Comment #1
niklp commentedFurther to that, clicking *anywhere* on the insert widget inserts the image. Shouldn't there be an explicit handler for the event associated with the submit button or something?
Comment #2
quicksketchNot sure when this occurred, but it looks like you're right. The wrapper div around the select list and button has the class "filefield-insert", which is the selector used to bind the click handler to the button (which also has the class "filefield-insert"). This patch should clear it up, which I've already committed.