slate: iOS Safari: Double-tapping the space bar doesn't insert a period

Do you want to request a feature or report a bug?

bug

What’s the current behavior?

Even when iOS’s ‘“.” Shortcut’ keyboard setting is enabled, double-tapping the spacebar in Slate doesn’t insert a period.

https://jsfiddle.net/rgrove/v0mkz2w0/4/

2017-09-23 20_15_21

What’s the expected behavior?

When iOS’s ‘“.” Shortcut’ keyboard setting is enabled, double-tapping the spacebar should insert a period followed by a space, as it does in a <textarea> or a native text field.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 23 (21 by maintainers)

Commits related to this issue

Most upvoted comments

@rgrove I think augmenting the current usage would be a good start, unless replacing is the only way to achieve what we want. I’m open to either solution there.

As for preventing the browser from inserting text—I don’t think we actually have to do this. The current onInput handling assumes that the browser has already inserted text, for example this is how the current spellcheck-handling behavior works. We could either let all of the input through, and backport the changes to the internal model. Or we could just expand the cases that let the input through, to handle these iOS cases, if there’s a way to discern them. (Potentially by using the event.inputType flag.)

It looks like this bug was introduced in #1088 with the removal of isNative (which also caused #1176). Please see #1176 for more discussion of this issue.