Commit e362dd9b authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#134307 by dww, Stefan Nantegaal and dvessel: fix table headers interaction...

#134307 by dww, Stefan Nantegaal and dvessel: fix table headers interaction with Safari, so the fieldset contents will not disappear
parent 7ab90f3b
...@@ -42,8 +42,7 @@ Drupal.behaviors.tableHeader = function (context) { ...@@ -42,8 +42,7 @@ Drupal.behaviors.tableHeader = function (context) {
ref = table; ref = table;
div.wide = true; div.wide = true;
} }
$(div).css('width', parseInt($(ref).width()) $(div).css('width', $(ref).width() - parseInt($(div).css('paddingLeft')) +'px');
- parseInt($(div).css('paddingLeft')) +'px');
// Get position and store. // Get position and store.
div.cell = this; div.cell = this;
...@@ -96,8 +95,7 @@ Drupal.behaviors.tableHeader = function (context) { ...@@ -96,8 +95,7 @@ Drupal.behaviors.tableHeader = function (context) {
// Resize the first cell to fit the table. // Resize the first cell to fit the table.
ref = this.table; ref = this.table;
} }
$(this).css('width', parseInt($(ref).width()) $(this).css('width', $(ref).width() - parseInt($(this).css('paddingLeft')) +'px');
- parseInt($(this).css('paddingLeft')) +'px');
}); });
// Reset timer // Reset timer
......
...@@ -352,6 +352,10 @@ html.js fieldset.collapsed legend a { ...@@ -352,6 +352,10 @@ html.js fieldset.collapsed legend a {
* html.js fieldset.collapsed table * { * html.js fieldset.collapsed table * {
display: inline; display: inline;
} }
/* For Safari 2 to prevent collapsible fieldsets containing tables from dissapearing due to tableheader.js. */
html.js fieldset.collapsible {
position: relative;
}
html.js fieldset.collapsible legend a { html.js fieldset.collapsible legend a {
display: block; display: block;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment