Don't ignore touch events on iOS 7.1.2 or later.

This commit is contained in:
Brian Geppert
2014-12-07 11:35:41 -06:00
parent 1d3cf36ba5
commit 0b06776404

View File

@@ -267,8 +267,9 @@ Blockly.Field.prototype.setValue = function(text) {
*/
Blockly.Field.prototype.onMouseUp_ = function(e) {
if ((goog.userAgent.IPHONE || goog.userAgent.IPAD) &&
e.layerX !== 0 && e.layerY !== 0) {
// iOS spawns a bogus event on the next touch after a 'prompt()' edit.
e.layerX !== 0 && e.layerY !== 0 &&
!goog.userAgent.isVersionOrHigher('537.51.2')) {
// Old iOS spawns a bogus event on the next touch after a 'prompt()' edit.
// Unlike the real events, these have a layerX and layerY set.
return;
} else if (Blockly.isRightButton(e)) {