Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5249

OnChangeAjaxBehavior doesn't work with cut/paste done with mouse



      Add OnChangeAjaxBehavior to a text-field. In chrome/firefox, we can cut and paste using just the mouse (right-click) and it fires an ajax-call each time. In IE, i doesn't fire except when we use keyboard. Ctrl+c/Ctrl+v works, but mouse right-click and cut/paste doesn't fire an ajax event.
      This is extra noticable in our case, since we had to remove the onchange-event from OnChangeAjaxBehavior. (If textfield had focus, and user clicked an ajax-button, the onchange-event fired and stopped the ajax-button-click from firing. Most likely because we have implemented a veil on ajax-calls, so the user can't click anything on the page while the ajax-event is running.)
      Workaround was to add the events cut and paste:
      in updateAjaxAttributes: attributes.setEventNames("inputchange paste cut");

      This WILL create issues if you don't throttle the ajax (we have 200 milliseconds throttling). Without throttling, it fires twice (might or might not be a problem).

      A better way would be to make the inputchange-event work properly in IE, but I have no idea why it doesn't work....


        1. Quickstart.zip
          25 kB
          Oddgeir Bell



            • Assignee:
              mgrigorov Martin Grigorov
              kizer Oddgeir Bell
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: