diff --git a/core/misc/dropbutton/dropbutton.base.css b/core/misc/dropbutton/dropbutton.base.css index 3c3683b..4b87ff6 100644 --- a/core/misc/dropbutton/dropbutton.base.css +++ b/core/misc/dropbutton/dropbutton.base.css @@ -19,7 +19,7 @@ position: relative; float: left; } -.js .dropbutton-wrapper.processed { +.js .dropbutton-wrapper.width-processed { float: none; } .js .dropbutton-wrapper, @@ -41,7 +41,7 @@ } -.js .dropbutton-widget.processed { +.js .dropbutton-widget.width-processed { position: absolute; } /* UL styles are over-scoped in core, so this selector needs weight parity. */ diff --git a/core/misc/dropbutton/dropbutton.js b/core/misc/dropbutton/dropbutton.js index 8e067c1..d952f00 100644 --- a/core/misc/dropbutton/dropbutton.js +++ b/core/misc/dropbutton/dropbutton.js @@ -23,10 +23,10 @@ Drupal.behaviors.dropButton = { // Set the width of the first dropbutton to that of the widest dropbutton // to prevent button text overflow on small screens. $($dropbuttons[0]).width($widestButton); - // Add a class to the dropbutton-wrapper and dropbutton-widget html + // Add a class to the dropbutton-wrapper and dropbutton-widget HTML // elements. This enables styles to be applied that ensure the // dropbutton text displays correctly. - $('.js .dropbutton-wrapper, .js .dropbutton-widget').addClass('processed'); + $('.js .dropbutton-wrapper, .js .dropbutton-widget').addClass('width-processed'); } } }; @@ -180,8 +180,7 @@ Drupal.DropButton = DropButton; * The width to compare against $button. * * @return {String} -* The largest width value. -* +* The larger value after comparing the widths of $button and $widestButton. */ function dropbuttonGetMaxWidth($button, $widestButton) { var buttonWidth = $('.dropbutton-widget', $button).outerWidth();