jonathan, I checked the code and apparently the block of code is
correct, if possible send me the complete code of the plugin, so maybe I
can help you
Regards
Alexandre C Vieira
www.alltips.xpg.com.br
[email protected]
On 04-01-2012 13:06, JMT wrote:
A custom plugin I wrote is behaving strangely with an upgrade to FF8.
Does anyone have any suggestions for what's going on?
The plugin allows me to keep my scroll position when I switch to
editing a long tiddler. I use it in conjunction with the "autosize"
option of Eric Shulman's TextAreaPlugin and SinglePageMode. I just
upgraded from FF 3.6 to FF 8 (and Win XP to Windows 7), and now the
plugin is broken. Now when I edit the tiddler (double click or ctrl-
enter), it scrolls to the bottom of the tiddler. (FWIW it works
properly in IE 8).
Here's the code:
(function() { // closure to create local scope for backup
// backup original function
window.config.commands.editTiddler.handler_noScroll =
window.config.commands.editTiddler.handler;
// override original function
window.config.commands.editTiddler.handler = function(event,src,title)
{ // arguments correspond to original function signature
// perform custom operations
var scrollPositionJT = findScrollY();
// invoke the original function
config.commands.editTiddler.handler_noScroll(event,src,title);
window.scrollTo(0,scrollPositionJT);
alert("hello!");
};
})();
You'll notice the superflous "Hello!" alert at the end. I put that in
just to make sure the script was running, and for some reason, that
fixed the problem! The window scrolls properly, and I get the alert.
Without the alert line, the plugin doesn't work and the windows
scrolls to the bottom of the tiddler.
If anyone has any suggestions, I'd be grateful. I'm really an amateur
with the Javascript. Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.