Mercurial > xmpp-account-manager
comparison nickname.js @ 34:45bd945c5722
Change all blur events to change, prevents a stanza when no change occured.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 23 Dec 2018 20:31:02 +0100 |
parents | 3eed9fe0bd7c |
children | 084202870d76 |
comparison
equal
deleted
inserted
replaced
33:038cab68fa3a | 34:45bd945c5722 |
---|---|
25 { | 25 { |
26 console.log('Failed to retrieve nickname: ' + string); | 26 console.log('Failed to retrieve nickname: ' + string); |
27 hideSpinner(spinner_img); | 27 hideSpinner(spinner_img); |
28 } | 28 } |
29 | 29 |
30 nick_input.addEventListener('blur', function (evt) { | 30 nick_input.addEventListener('change', function (evt) { |
31 const iq = $iq({type: 'set'}) | 31 const iq = $iq({type: 'set'}) |
32 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub'}) | 32 .c('pubsub', {xmlns: 'http://jabber.org/protocol/pubsub'}) |
33 .c('publish', {node: 'http://jabber.org/protocol/nick'}) | 33 .c('publish', {node: 'http://jabber.org/protocol/nick'}) |
34 .c('item', {id: 'current'}) | 34 .c('item', {id: 'current'}) |
35 .c('nick', {xmlns: 'http://jabber.org/protocol/nick'}) | 35 .c('nick', {xmlns: 'http://jabber.org/protocol/nick'}) |