Skip to content

Conversation

@whawker
Copy link
Contributor

@whawker whawker commented Oct 5, 2016

This test was always returning false even when the browser and OS were in a Spanish locale.

You can see this for yourself by changing Chrome's default language to Spanish, and loading the Modernizr test page.

The initial value of the input box is 1,0 - when we document.execCommand('InsertText', false, '1,1') it was prepending to the start of the input value resulting in 111,0.

By executing document.execCommand('SelectAll', false) first, we ensure we overwrite the current input value, and the test passes.

@ryanseddon ryanseddon merged commit 6c4d87c into Modernizr:master Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants