8000 refs #615: sendkeys does not work with contenteditable by mduvall · Pull Request #620 · casperjs/casperjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 19, 2020. It is now read-only.

refs #615: sendkeys does not work with contenteditable #620

Merged
merged 2 commits into from
Sep 12, 2013

Conversation

mduvall
Copy link
Collaborator
@mduvall mduvall commented Sep 12, 2013

This fixes an issue where sendKeys does not fill in the text on
contentEditable elements. The element is checked in the attributes
object whether contenteditable is true and clicks the element to
sendKeys to.

fixes https://github.com/n1k0/casperjs/issues/615.

This fixes an issue where sendKeys does not fill in the text on
contentEditable elements. The element is checked in the attributes
object whether `contenteditable` is true and clicks the element to
sendKeys to.
@n1k0
Copy link
Member
n1k0 commented Sep 12, 2013

Adding support for this in sendKeys() is fine with me, though I'd expect some bits of documentation added along this patch :)

Thanks

@mduvall
Copy link
Collaborator Author
mduvall commented Sep 12, 2013

@n1k0 Definitely, sorry about leaving that out initially. I pushed the documentation under 1.1 and listed explicitly the types of elements that sendKeys will send the keyboard events to.

n1k0 added a commit that referenced this pull request Sep 12, 2013
refs #615: sendkeys does not work with contenteditable
@n1k0 n1k0 merged commit 7897d32 into casperjs:master Sep 12, 2013
@n1k0
Copy link
Member
n1k0 commented Sep 12, 2013

Great patch, thanks for contributing!

@gopikrishnaA
Copy link

(Boolean) reset:
When set to true, this option will first empty the current field value. By default, it’s set to false and sendKeys() will just append string to the current field value.
I am using following command for content-editable='true' edit box

this.sendKeys('form#event-form div.nicEdit-main', 'gopi', {reset: true ,keepFocus: true});

The issue was it is not clearing the current field value.But it is appending the current field value.Please tell me how to clear the current content.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0