Known problems in XULRunner 1.9.2
org.mozilla.interfaces.inIFlasher
inIFlasher does not work on MacOS. It is needed to show a border around selected elements in VPE.
Workaround: To show a border on MacOS the following style is used: "border: 2px solid COLOR_NAME !important". But the workaround has a drawback: if the selected elements has its own border, it is not visible.
draggesture event
XULRunner does not fire 'draggesture' event on Linux.
Workaround: Special button for Drag&Drop actions is used. Instead of listening to the 'draggesture' events, VPE listens to the 'mousedown' event on this button.
org.mozilla.interfaces.nsIDragService.invokeDragSession(...)
The method invokeDragSession works differently on Windows and Linux. On Windows it exits after the session is ended. On Linux it exits immediately. The following snippet illustrates this:
document.addEventListener("dragstart", new nsIDOMEventListener() {
nsISupports queryInterface(String uuid) {
return null;
}
void handleEvent(nsIDOMEvent event) {
nsIDragService dragService = (nsIDragService)
Mozilla.getInstance().getServiceManager()
.getServiceByContractID("@mozilla.org/widget/dragservice;1",
nsIDragService.NS_IDRAGSERVICE_IID);
System.out.println("BEFORE invokeDragSession");
dragService.invokeDragSession(node, transferables, null,
nsIDragService.DRAGDROP_ACTION_MOVE
| nsIDragService.DRAGDROP_ACTION_COPY
| nsIDragService.DRAGDROP_ACTION_LINK);
System.out.println("AFTER invokeDragSession");
}
}, false);
document.addEventListener("dragend", new nsIDOMEventListener() {
nsISupports queryInterface(String uuid) {
return null;
}
void handleEvent(nsIDOMEvent event) {
System.out.println("dragend");
}
}, false);
document.addEventListener("dragover", new nsIDOMEventListener() {
nsISupports queryInterface(String uuid) {
return null;
}
void handleEvent(nsIDOMEvent event) {
System.out.println("dragover");
}
}, false);
Windows output:
BEFORE invokeDragSession
dragover
dragover
...
dragover
dragend
AFTER invokeDragSession
Linux output:
BEFORE invokeDragSession
AFTER invokeDragSession
dragover
dragover
...
dragover
dragend