Incorrect assignment of JavaScript events

Previous topic - Next topic



I am working on Scribus 1.5.0. (Build ID: C-C-T-F-C1.14.2-64bit) on Ubuntu 15.04.

When I setup JavaScript action in, say, text input field there is a list of events that I can select to bind my JS code to. And this binding seems to work wrong...

To see it, try to add a new input text field and assign some JS code to MouseUp event. Click OK and close the dialog. Then reopen the dialog and check "MouseUp" event... it is empty. The JS code appears in MouseDown event...

Whatever is saved in MouseDown shows up in MouseUp. After opening and closing the dialog I couldn't see any consistency in how MouseUp and MouseDown events affect each other, but for sure they do. Other events, i.e. MouseEnter, MouseExit, OnFocus, OnBlur work OK.

I looked at *.sla file and noticed the mapping:

  • MouseUp -> "ANACTION" property of PAGEOBJECT element associated with this field (it can be identified by searching for the 'name' that was used on element properties dialog)
  • MouseDown -> "ANDACT" property
  • MouseEnter -> "ANEACT"
  • MouseExit -> "ANXACT"
  • OnFocus -> "ANFOACT"
  • OnBlur -> "ANBLACT"

When I manually set values of mentioned properties in *.sla file, the dialog in Scribus shows them correctly. But any attempt to change them in Scribus, results in wrong assignment (MouseUp and MouseDown particularly).


To me it sounds like a verified bug, most likely a mixup the writing of the objects. would be the right place to post it.


Hey OP,
Nermander is correct, you should post this as a bug, so others could test it.
Here's a tip: You could compile Scribus 1.5.1svn in a separate directory and test those type of issues on it. Lots of things are getting fixed in 1.5.1 that don't work correctly on 1.5.0
Just be warned that it is unstable and bleeding edge. I use it just the same though.
If you want to compile it there are some great scripts from jluc