Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-747

a comment doesn't accept a font size with a double number

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • 6.1.0
    • 5.12.2
    • None
    • None

      Steps to Reproduce

      1. copy the text from keikai-747.html
      2. insert a comment and paste the text into the comment

      Current Result

      java.lang.NumberFormatException: For input string: "14.6"
      at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.base/java.lang.Integer.parseInt(Integer.java:652)
      at java.base/java.lang.Integer.parseInt(Integer.java:770)
      at io.keikai.model.util.RichTextHelper.toFont(RichTextHelper.java:129)
      at io.keikai.model.util.RichTextHelper.parseElement(RichTextHelper.java:64)
      at io.keikai.model.util.RichTextHelper.parseElement(RichTextHelper.java:76)
      at io.keikai.model.util.RichTextHelper.parse(RichTextHelper.java:59)
      at io.keikai.range.impl.RangeImpl$68.visit(RangeImpl.java:2601)
      at io.keikai.range.impl.RangeImpl.travelCells(RangeImpl.java:311)
      at io.keikai.range.impl.RangeImpl.access$000(RangeImpl.java:103)
      at io.keikai.range.impl.RangeImpl$CellVisitorTask.invoke(RangeImpl.java:174)
      at io.keikai.model.util.ReadWriteTask.doInWriteLock(ReadWriteTask.java:43)
      at io.keikai.range.impl.RangeImpl.setCommentRichText(RangeImpl.java:2612)
      at io.keikai.api.impl.RangeImpl.setCommentRichText(RangeImpl.java:949)
      at io.keikaiex.ui.impl.undo.CellCommentAction.doAction(CellCommentAction.java:46)
      at io.keikaiex.ui.impl.UndoableActionManagerImpl.doAction(UndoableActionManagerImpl.java:51)
      at io.keikaiex.ui.impl.ua.AbstractCommentHandler$1.onEvent(AbstractCommentHandler.java:40)
      at io.keikaiex.ui.impl.ua.AbstractCommentHandler$1.onEvent(AbstractCommentHandler.java:31)
      at io.keikaiex.ui.dialog.impl.DialogCtrlBase$1.onEvent(DialogCtrlBase.java:59)
      at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3191)
      at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3161)
      at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3103)

      Expected Result

      no error

      Debug Information

      • the pasted text has a double number font-size
        *The font size could be a double when:
        • Scaling and Zooming: The user has zoomed in or out on the web page, causing the browser to calculate font sizes in non-integer values.
        • CSS Specifications: Some CSS frameworks or stylesheets define font sizes using relative units (like em, rem, %, or vw) or fractional values, which can lead to non-integer computed values.

      Workaround


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

              Created:
              Updated: