mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2024-11-14 18:09:03 +01:00
Fixed a UI glitch where a tag may not be saved
This commit is contained in:
parent
781966771b
commit
6a27c3f5e1
@ -76,7 +76,7 @@ Clipperz.PM.UI.Components.Cards.TagEditor = React.createClass({
|
|||||||
anEvent.currentTarget.value = "";
|
anEvent.currentTarget.value = "";
|
||||||
},
|
},
|
||||||
|
|
||||||
handleKeyDown: function(anEvent) {
|
handleKeyDown: function (anEvent) {
|
||||||
switch (anEvent.keyCode) {
|
switch (anEvent.keyCode) {
|
||||||
|
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
@ -113,6 +113,10 @@ Clipperz.PM.UI.Components.Cards.TagEditor = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleBlur: function (anEvent) {
|
||||||
|
this.addTagValue(anEvent);
|
||||||
|
},
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
renderTag: function (aTag) {
|
renderTag: function (aTag) {
|
||||||
@ -124,7 +128,7 @@ Clipperz.PM.UI.Components.Cards.TagEditor = React.createClass({
|
|||||||
|
|
||||||
renderEditField: function () {
|
renderEditField: function () {
|
||||||
return [
|
return [
|
||||||
React.DOM.input({'type':'text', 'list':'tagListData', 'onKeyDown':this.handleKeyDown, 'placeholder': "tag"}),
|
React.DOM.input({'type':'text', 'list':'tagListData', 'onKeyDown':this.handleKeyDown, 'onBlur':this.handleBlur, 'placeholder': "tag"}),
|
||||||
React.DOM.datalist({'id':'tagListData'}, MochiKit.Base.map(function (aTag) { return React.DOM.option({}, aTag); }, this.listOfTagsNotUsedYet()))
|
React.DOM.datalist({'id':'tagListData'}, MochiKit.Base.map(function (aTag) { return React.DOM.option({}, aTag); }, this.listOfTagsNotUsedYet()))
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user