The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
Thanks, Simon and Bird.
Bird, I tested your latest code and it works on Chrome but still not working in Firefox 14. I haven't tested it yet on IE9 because I have IE8 and well it doesn't work on IE8 but at least I got feedback from IE8 error log: Code:
"Can't move focus to the control because its invisible, not enabled, or of a type that does not accept the focus" Or maybe there is a type on your code? |
#22
|
||||
|
||||
I copied the code directly from my test site where it is/was working.
It is working fine on Firefox 13 and Firefox 14 and Waterfox which is a 64 bit version of Firefox. I only put it in place of the top "Post Reply" button... curious if you tried it from that location? You could try this alternate code- it should do the same thing, again I have tested it in IE9 and FF and Chrome: HTML Code:
<td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; vbform.elements['message'].focus();"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> Code:
location.hash = '#qrform'; |
#23
|
|||
|
|||
I figured out what the problem is. It works (I'm using your original code) when your quick reply box isn't WYSIWYG by default. When it's WYSIWYG by default (like mine) then it doesn't work. Try it and you'll see. Any workaround?
|
#24
|
||||
|
||||
Good eye...
OK So I had to add a condition to test if the wysiwg editor is enabled, both in vb and the browser... this is working for me- Code:
<if condition="$show['wysiwyg']"> <td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; if (document.getElementById('vB_Editor_QR_iframe')) { document.getElementById('vB_Editor_QR_iframe').focus(); } else { document.getElementById('vB_Editor_QR_textarea').focus(); }"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> <else /> <td class="smallfont"><a href="javascript:void(0);" onclick="location.hash = '#qrform'; document.getElementById('vB_Editor_QR_textarea').focus();"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td> </if> |
#25
|
|||
|
|||
Thanks! Now it's working fine in Firefox... so it's all about getting it to work on IE. I'm not a programmer but I'll try to play with your code and see if I have luck. I hope so!
|
#26
|
||||
|
||||
In Googling the issue setting focus in IE is a common problem-
I tried some options here: http://stackoverflow.com/questions/2...n-iframe-in-ie But no luck yet. |
#27
|
|||
|
|||
I have noticed that when using the quick reply button the focus is inside the text area be it WYSIWYG or not (IE9). So I'm sure that what I'm looking for is doable however it appears to be more hard than what I expected
|
#28
|
|||
|
|||
Wow, so simple in theory. Not surprising, though. xD
|
#29
|
|||
|
|||
If anyone knows how to make this to work please help.
|
#30
|
|||
|
|||
Put this in the <head> section of the SHOWTHREAD template --
HTML Code:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> jQuery.noConflict(); (function ($) { $(document).ready(function() { $('body').find('a[href^="newreply.php"]:not([id])').each(function() { $(this).click(function() { $('a#qr_1').click(); return false; }); }); }); })(jQuery); </script> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|