Skip to content

Instantly share code, notes, and snippets.

View iain-merrick-fanduel's full-sized avatar

Iain Merrick iain-merrick-fanduel

View GitHub Profile
@iain-merrick-fanduel
iain-merrick-fanduel / controlled_input_bug.js
Created March 27, 2020 12:15
Bug: cursor jumps to end of controlled <input> tag when value is modified
// Adapted from example code in https://reactjs.org/docs/forms.html
// Original CodePen link: https://codepen.io/gaearon/pen/VmmPgp?editors=0010
class NameForm extends React.Component {
constructor(props) {
super(props);
this.state = {value: 'put_a_space_in_the_middle'};
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
@iain-merrick-fanduel
iain-merrick-fanduel / keybase.md
Created July 27, 2018 12:47
Verifying myself on Keybase

Keybase proof

I hereby claim:

  • I am iain-merrick-fanduel on github.
  • I am iain_merrick_fd (https://keybase.io/iain_merrick_fd) on keybase.
  • I have a public key ASC6oCL5JCpMif_o9K_VrzQOyUWpgfl1rNbZUUumb5VYWwo

To claim this, I am signing this object: