Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping inner <object> tags with Firefox to avoid SwfObj conflict. (to ... #58

Merged
merged 1 commit into from Apr 22, 2013

Conversation

emiluzelac
Copy link
Contributor

...avoid wrapping with <div> nested <object> tags like <object>...<object>...</object>...</object>. This was already released in my http://themes.svn.wordpress.org/responsive/1.6.1/js-dev/jquery.fitvids.js Theme. Patch was proposed and sent to me by Oriol Arcas.

…to avoid wrapping with <div> nested <object> tags like <object>...<object>...</object>...</object>. This was already released in my http://themes.svn.wordpress.org/responsive/1.6.1/js-dev/jquery.fitvids.js Theme. Patch was proposed and sent to me by Oriol Arcas.
davatron5000 added a commit that referenced this pull request Apr 22, 2013
Skipping inner <object> tags with Firefox to avoid SwfObj conflict. (to ...
@davatron5000 davatron5000 merged commit 18a8dac into davatron5000:master Apr 22, 2013
@kkomelin
Copy link

Hi,

I've noticed an issue which is directly related to this commit.
FitVids doesn't work.

Browser: Firefox 22
jQuery: 1.2.6
Drupal module: emfield 6.x-1.26
Video object source:

<object type="application/x-shockwave-flash" height="320" width="568" data="http://www.youtube.com/v/kCUrfTZi9L0&amp;rel=0&amp;enablejsapi=1&amp;playerapiid=ytplayer&amp;fs=1" id="emvideo-youtube-flash-1"><param name="movie" value="http://www.youtube.com/v/kCUrfTZi9L0&amp;rel=0&amp;enablejsapi=1&amp;playerapiid=ytplayer&amp;fs=1"><param name="allowScriptAccess" value="sameDomain"><param name="quality" value="best"><param name="allowFullScreen" value="true"><param name="bgcolor" value="#FFFFFF"><param name="scale" value="noScale"><param name="salign" value="TL"><param name="FlashVars" value="playerMode=embedded"><param name="wmode" value="transparent"></object>

This code doesn't contain two object tags but .not() function filter it out.
Maybe the problem is in jQuery version which is obviously not the latest.

I commented out the line $allVideos = $allVideos.not("object object"); // SwfObj conflict patch and it is working now.

Is it possible to address this issue efficiently? The option with updating jQuery is not acceptable.

Thanks in advance!

@davatron5000
Copy link
Owner

Do you have a link or a reduced test case to demonstrate this breaking?

If object object if failing on your page, then chances are you have an unclosed object tag somewhere on the page. Otherwise FitVids would have no reason to pop it from the stack of selected items.

If you insist on using a version of jQuery that is OVER 5 YEARS OLD, then you'll most likely have to use a custom hacked version of FitVids on your site. It looks like the .not() function had some reworking around jQuery 1.4 (3+ years ago), so perhaps that might help you in your quest.

@kkomelin
Copy link

Thanks @davatron5000 for the fast response!

Unfortunately, I cannot share the link. It's client's project.

We only have one object tag on the page, the source code is provided in my previous comment.
FitVids extracts the tag into the list $allVideos correctly but then $allVideos.not("object object") removes it from the list. So I can say that the issue is in $allVideos.not("object object") instruction.

I agree that our version of jQuery is too old but sometimes it's not so easy to upgrade. We have to use some hacks like I did for the issue.

Anyway, thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants