Mailing List Archive

[bricoleurs/bricolage] 75777d: Use imageSubmit for OC and Category delete buttons...
Branch: refs/heads/rev-2.0
Home: https://github.com/bricoleurs/bricolage

Commit: 75777d305f8b72e555ab6f67edc7b5816ed25480
https://github.com/bricoleurs/bricolage/commit/75777d305f8b72e555ab6f67edc7b5816ed25480
Author: David E. Wheeler <david@justatheory.com>
Date: 2011-12-01 (Thu, 01 Dec 2011)

Changed paths:
M comp/widgets/media_prof/list_output_channels.html
M comp/widgets/profile/imageSubmit.mc
M comp/widgets/story_prof/list_categories.html
M comp/widgets/story_prof/list_output_channels.html

Log Message:
-----------
Use imageSubmit for OC and Category delete buttons.

On Firefox, at least, the image input button created by `/widgets/profile/button.mc` was causing subsequent calls to `form.submit()` to fail. For example, if you deleted a category and then hit the "Note" button, which calls `customSubmit()`, which calls `form.submit()`, the submit would fail. There would be no submit at all. I could not figure out why. Near as I can tell, hitting an image input and then not actually submitting causes the `form.submit()` DOM method to be disabled. But if you hit some other form method, it worked. NFI why.

So work around it by using an image submit link rather than input control. The functionality is the same, but does not break subsequent calls to `form.submit()` by other controls. I'm not altogether happy with this solution, but I can't see any other way around it without digging into the guts of Firefox, which I don't know at all.

Better, down the line, might be to alter the behavior of the Notes, Trail, Bulk Edit, and Diff/View buttons so that they don't do submits, but open a popover window or div. But that's a significan revision for another day (and wouldn't fix existing releases anyway, being new features).

So this will have to do.

[#281 state:closed]


Commit: d88f9900f9eeb3966a9d552442b9573c37cfb3e6
https://github.com/bricoleurs/bricolage/commit/d88f9900f9eeb3966a9d552442b9573c37cfb3e6
Author: David E. Wheeler <david@justatheory.com>
Date: 2011-12-01 (Thu, 01 Dec 2011)

Changed paths:
M lib/Bric/Changes.pod

Log Message:
-----------
Note Notes/trail/Bulk Edit/Diff/View buttons fix.


Compare: https://github.com/bricoleurs/bricolage/compare/5931980...d88f990