Closed (fixed)
Project:
Autosave
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2012 at 04:24 UTC
Updated:
30 Jul 2012 at 22:38 UTC
Jump to comment: Most recent file
Comments
Comment #1
quicksketchI found the problem here is because Drupal's AJAX system automatically loads missing CSS/JS files onto the page after an AJAX request. For Autosave module, the "restore" path is not considered administrative, and so therefor the front-end theme (i.e. Bartik) has its CSS appended to that of the admin theme (i.e. Seven). To prevent this problem, we can easily just record the current theme being used and set it again using hook_custom_theme(). Patch attached.
Comment #2
quicksketchCommitted.
Comment #4
hey_germanoI think this might also be an issue: http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_htm...
When the form reloads with autosaved data, the CSS IDs on the form fields change to the incremented ones. For example, the div ID around one of my text fields changes from "edit-field-collector-first-name" to "edit-field-collector-first-name--2" after the autosaved data gets pulled in. So my CSS which used those IDs doesn't work.
For now I think I'll just re-do my node form CSS to use classes instead of IDs, but if I have a chance, I can look into something better.