Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-datastore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- 8081:8081
volumes:
- datastore:/root/.config
command: gcloud beta emulators datastore start --host-port=0.0.0.0:8081 --project glowscript-dev
command: sh -c "gcloud beta emulators datastore start --host-port=0.0.0.0:8081 --project glowscript-dev"

volumes:
datastore:
16 changes: 13 additions & 3 deletions lib/glow/primitives.js
Original file line number Diff line number Diff line change
Expand Up @@ -2914,16 +2914,26 @@
attrs.jwinput = $('<input type="text" id="'+attrs._id+'"/>').val(attrs.text).appendTo(attrs.pos)
.css({"width":attrs.width.toString()+'px', "height":attrs.height.toString()+'px',
"font-size":(attrs.height-5).toString()+"px", "font-family":"sans-serif"})
.keypress( function(k) { if (k.keyCode == 13) { // 13 is Next
.keypress( function(k) {
if (k.keyCode == 13) { // 13 is Next
attrs.text = attrs.jwinput.val()
var ok = wparse()
if (!ok) {
alert('Numeric input error')
return
}
attrs.bind(cwinput)
}
})
.blur(function(k) {
attrs.text = attrs.jwinput.val()
var ok = wparse()
if (!ok) {
alert('Numeric input error')
return
}
attrs.bind(cwinput)
}
})
})

var cwinput = { // this structure implements a JavaScript "closure", essential for winput to work
get disabled() {return attrs.disabled},
Expand Down