You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-dev@incubator.apache.org by "Turyn, Michael (JIRA)" <xa...@incubator.apache.org> on 2007/02/16 22:03:06 UTC

[jira] Commented: (XAP-313) Strange error when calling an MCO with an alert in FireFox

    [ https://issues.apache.org/jira/browse/XAP-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473834 ] 

Turyn, Michael commented on XAP-313:
------------------------------------

Note:  this is a relatively innocuous XUL error, and not a fatal exception---the standard user who has no idea of the JS console won't be bothered by it, since the alert() still works.

Other data:
  If focus is moved to a page element outside of the DIV enclosing the XAP application between typing in the textfield and hitting the button, the error goes away.

If focus is moved to a selectable label _within_ the xap application

If a debugger breakpoint is place on the "alert" line, the error vanishes.

If a 0-ms timeout is used to bring up the alert box, no error.

If a prompt() is used instead of an alert(0, no bug.

Conclusion:  The textfield has been left in some weird state I can't ascertain yet.  

> Strange error when calling an MCO with an alert in FireFox
> ----------------------------------------------------------
>
>                 Key: XAP-313
>                 URL: https://issues.apache.org/jira/browse/XAP-313
>             Project: XAP
>          Issue Type: Bug
>            Reporter: Trevor Oldak
>            Priority: Minor
>
> Load the followng 2 files:
> index.xal
> <xal xmlns="http://openxal.org/ui">
>     <mco xmlns="http://openxal.org/core/mco" id="handler" class="EventHandler" src="src-js/EventHandler.js"/>
>     <freePane xmlns="http://openxal.org/ui" id="panel" width="500px" height="300px" fontSize="10pt">
>         <button text="Input your name and click" onCommand="mco:handler.passParam('foo')"/>
>         <textField xmlns="http://openxal.org/ui/html" height="20px" text="" id="name" width="150px"
>             x="200px" fontSize="10pt"/>
>     </freePane>
> </xal>
> EventHandler.js
> EventHandler = function  () {
> };
> EventHandler.prototype.passParam = function (name) {
> 	alert('Hello '+name+'!');
>    	return;
> };
> 1) Enter text into the text field
> 2) Click the button. In FireFox, a bug will be thrown:
> [Exception... "'Permission denied to set property XULElement.selectedIndex' when calling method: [nsIAutoCompletePopup::selectedIndex]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://localhost:81/XAP_testing53/.dist/samples/xap/xapcore.js :: anonymous :: line 113" data: no]
> xapcore.js (line 113)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.