Sync persona between tabs only if the QR's closed. Close #191

This commit is contained in:
Nicolas Stepien 2012-02-08 01:45:37 +01:00
parent eb4c557d90
commit 84dbb47ea8
2 changed files with 2 additions and 2 deletions

View File

@ -1649,7 +1649,7 @@
}
$.sync('qr.persona', function(persona) {
var key, val, _results;
if (qr.replies.length !== 1) return;
if (!qr.el.hidden) return;
_results = [];
for (key in persona) {
val = persona[key];

View File

@ -1234,7 +1234,7 @@ qr =
$.on input, 'change', -> qr.selected[@name] = @value
# sync between tabs
$.sync 'qr.persona', (persona) ->
return if qr.replies.length isnt 1
return unless qr.el.hidden
for key, val of persona
qr.selected[key] = val
$("[name=#{key}]", qr.el).value = val