Opened 4 years ago

Last modified 18 months ago

#18549 new defect

stopParser not working in templated widgets

Reported by: MarkoV Owned by: bill
Priority: undecided Milestone: 1.14
Component: Parser Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

The parser does not honour stopParser:true in a custom widget with WidgetsInTemplateMixin?. It still tries to parse the widget again leading to the "but that id is already registered" error.

example:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <script type="text/javascript" >
        var dojoConfig={
            async: true,
            parseOnLoad: true,
            isDebug: true,
            locale: 'en-gb',
            aliases: [["text", "dojo/text"]],
            packages: [{
                location: location.pathname.replace(/\/[^/]+$/, "") +"../mymodule",
                name: "test"
            }]
        }
    </script>
 <script src="//ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js"></script>
    <script type="text/javascript" >
        require([
            'test/mod',
            'dojo/domReady!'
        ], function(mod) {
            var mg = new mod({},"mod")
            mg.startup()
        });
    </script>
</head>
<body>
<div id="mod"></div>
</body>
</html>


define([
    'dijit/_WidgetBase',
    'dijit/_WidgetsInTemplateMixin',
    'dijit/layout/LayoutContainer',
    'dijit/_TemplatedMixin',
    'dojo/_base/declare'
], function(WidgetBase, WidgetsInTemplateMixin,  LayoutContainer,_TemplatedMixin,  declare) {
    return declare([ WidgetBase,_TemplatedMixin,WidgetsInTemplateMixin], {
        templateString:"<div> <div data-dojo-type='dijit/layout/LayoutContainer' data-dojo-attach-point='header' ></div> </div> ",
        stopParser:true,
        startup: function() {

        }

    });
});

Attachments (1)

bug.zip (1.1 KB) - added by MarkoV 4 years ago.
Example code

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by MarkoV

Attachment: bug.zip added

Example code

comment:1 Changed 3 years ago by dylan

Milestone: tbd1.12

comment:2 Changed 18 months ago by dylan

Milestone: 1.131.14
Note: See TracTickets for help on using tickets.