Skip to content

Commit

Permalink
width="auto" is not valid HTML5 value for attribute (Syntax of non-ne…
Browse files Browse the repository at this point in the history
…gative integer:

One or more digits (0–9). For example: 42 and 0 are valid, but -273). 
Not sure what the width is used for in the embed of the SWF here, is it needed?
  • Loading branch information
grEvenX committed Feb 7, 2012
1 parent fa9c78c commit 6f30fb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/soundmanager2.js
Expand Up @@ -4409,7 +4409,7 @@ function SoundManager(smURL, smID) {
localURL = (_s.altURL || remoteURL),
swfTitle = 'JS/Flash audio component (SoundManager 2)',
oEmbed, oMovie, oTarget = _getDocument(), tmp, movieHTML, oEl, extraClass = _getSWFCSS(),
s, x, sClass, side = 'auto', isRTL = null,
s, x, sClass, side = '1', isRTL = null,
html = _doc.getElementsByTagName('html')[0];

isRTL = (html && html.dir && html.dir.match(/rtl/i));
Expand Down

1 comment on commit 6f30fb6

@scottschiller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find, thanks for the note.

Width calculations are important to the SWF here. If "1" is specified, the SWF will probably end up as 1x1 instead of (potentially) inheriting from CSS, and that can affect performance in some cases (where the SWF needs to be at least 6x6.) I may simply remove the width/height stuff to work around this.

Please sign in to comment.