Re: set_dirty is using unspecified behaviour in html/semantics/forms/constraints/support/validator.js (#923)

Yes, the execCommand() requires that the edited element is editing host or editable. I think the input is editable in the default state  although the designMode is not set to on. If my thought is not correct. I think below codes may fixed the issue.

set_dirty: function(ctl) {
    document.disgnMode = "on";
    ctl.focus();
    ctl.value += "a";
    ctl.setSelectionRange(ctl.value.length, ctl.value.length);
    document.execCommand("Delete");
    document.disgnMode = "off";
  },


View on GitHub: https://github.com/w3c/web-platform-tests/issues/923#issuecomment-41520315

Received on Monday, 28 April 2014 03:27:11 UTC