cuprite icon indicating copy to clipboard operation
cuprite copied to clipboard

`node.trigger(:input)` doesn't dispatch an `input` event

Open janko opened this issue 3 years ago • 1 comments

From following the JavaScript code, I believe that node.trigger(:input) currently ends up calling this.dispatchEvent('input'). However, that isn't the correct way to dispatch this event, it should be this.dispatchEvent(new Event('input')).

That's presumably the reason why the Cuprite JavaScript class defines a special input() function, instead of calling trigger(). https://github.com/rubycdp/cuprite/blob/2bbf3634d92af4e8b8ec3026c2b66ccf1d0590ad/lib/capybara/cuprite/javascripts/index.js#L182-L186

janko avatar May 19 '22 13:05 janko

Additionally, shouldn't this event have a property like: { inputType:"insertText" }?

jcoyne avatar Aug 18 '22 20:08 jcoyne