Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: extras
    • Labels:
      None

      Description

      IntegerField can't disallow pasting text chars in it

      1. cp-test.zip
        23 kB
        Alkiviades Kafkis

        Activity

        Hide
        Bob Schellink added a comment -

        IntegerField has an onkeypress JavaScript filter which prevents the paste function. Is it possible in JS to conditionally paste which works across all browsers?

        What is the validation behavior if the onkeypress attribute is removed e.g:

        public void onInit()

        { IntegerField f = new IntegerField("field"); f.removeAttribute("onkeypress"); }
        Show
        Bob Schellink added a comment - IntegerField has an onkeypress JavaScript filter which prevents the paste function. Is it possible in JS to conditionally paste which works across all browsers? What is the validation behavior if the onkeypress attribute is removed e.g: public void onInit() { IntegerField f = new IntegerField("field"); f.removeAttribute("onkeypress"); }
        Hide
        Alkiviades Kafkis added a comment -

        this test disallows pasting based on the id of the input textbox.
        i 'll try to figure out if it is possible to capture the text to be pasted from the event that is raised. if it is then it would be possible to allow pasting conditionally.

        this test works even in ie 5.5 thanx to mootools library.

        Show
        Alkiviades Kafkis added a comment - this test disallows pasting based on the id of the input textbox. i 'll try to figure out if it is possible to capture the text to be pasted from the event that is raised. if it is then it would be possible to allow pasting conditionally. this test works even in ie 5.5 thanx to mootools library.

          People

          • Assignee:
            Adrian A.
            Reporter:
            Alkiviades Kafkis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development