Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18514

Notification widget replace function doesn't work as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 12.10.5, 13.2-rc-1
    • None
    • Unknown

    Description

      Use the following code in a JSX:

      var notification;
      for (i = 0; i < 10; i++) {
        if (i == 0) {
          notification = new XWiki.widgets.Notification('In progress', 'inprogress');
        } else {
          notification.replace(new XWiki.widgets.Notification('Done', 'done'));
        }
      }
      

      Expected result: Have only one notification displayed. Initial value In progress, then replaced by Done for 9 times.
      Actual result: 9 Done notifications are displayed at the same time. Only the first replace works. See multipleNotifications.png

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            acotiuga Alex Cotiugă
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: