Opened 10 years ago

Closed 10 years ago

#15110 closed defect (invalid)

dijit.Dialog hitch issue

Reported by: hbaaron Owned by: hbaaron
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


I know you're not going to fix this issue, because you refuse to fix another similiar issue I raised. So, this is just my complain that how fragile that dojo's template mechanism could be.

The error is: Uncaught dojo.hitch: scopeonCancel? is null (scope="[Widget dijit.Dialog, dijit_Dialog_2]")

You see, it thinks " onCancel" is the method name instead of "onCancel". I can reproduce the same issue if I made my own template and place a space between "ondijitclick:" and "onCancel", i.e: "ondijitclick: onCancel"

Why don't you provide the template string as: <div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">

<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar"> <span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span> <span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick:onCancel" title="${buttonCancel}" role="button" tabIndex="-1">

<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>

</span> </div>

<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>


Change History (3)

comment:1 Changed 10 years ago by ben hockey

those values from the template get trimmed so it shouldn't matter if there is a space there or not.

the one way i see this problem happening is if for some reason you (or a library you've included) have modified String.prototype to add a faulty implementation of trim. is that a possibility?

comment:2 Changed 10 years ago by bill

Component: GeneralDijit
Owner: set to hbaaron
Status: newpending

dijit.Dialog's template has a space: data-dojo-attach-event="ondijitclick: onCancel" and it works fine. If @neonstalwart's advice doesn't fix your problem, please attach a test case that lets me reproduce the problem.

comment:3 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.