Uploaded image for project: 'ZK Calendar'
  1. ZK Calendar
  2. ZKCAL-68

moving an Calendar event causes a NumberFormatException in IE11

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.0
    • 2.1.5
    • Security Level: Jimmy
    • None
    • IE11

      steps to reproduce

      1. load the attached zul in IE11
      2. drag the calendar event and move it to another day
        (if you set zoom level other than 100% e.g. 125%, it's easier to reproduce this bug)

      current result

      sometimes, the server throws the exception:

      SEVERE:
      java.lang.NumberFormatException: For input string: "335.6199951171875"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:492)
      at java.lang.Integer.parseInt(Integer.java:527)
      at org.zkoss.calendar.event.CalendarsEvent.getInt(CalendarsEvent.java:143)
      at org.zkoss.calendar.event.CalendarsEvent.getUpdateEvent(CalendarsEvent.java:117)
      at org.zkoss.calendar.Calendars.service(Calendars.java:938)
      at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:710)
      at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1249)
      at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:603)

      root cause

      • client side sends a double ( MouseEvent.pageX) and the component tries to parse it as an integer

      debug information

      • chrome and firefox don't have such issue

            hawk hawk
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: