Revision: 4894 http://sourceforge.net/p/vexi/code/4894 Author: mkpg2 Date: 2016-10-30 01:43:08 +0000 (Sun, 30 Oct 2016) Log Message: ----------- Fix/Change numfield. Do not put value when losing focus (unless not autoupdating). - causes unwanted behaviour when closing a surface with a group of inter-related numfields.
Modified Paths: -------------- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t =================================================================== --- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t 2016-10-28 18:11:40 UTC (rev 4893) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/numfield.t 2016-10-30 01:43:08 UTC (rev 4894) @@ -98,10 +98,13 @@ /** when focus changes, self put text in case text content is updated */ static.focusWrite = function(v) { - if (!v) { - // this will make sure the value is set, - // and round the value from the text field - trapee.KeyPressed = "enter"; + if(!trapee.updateValueonKeyPressed){ + const v0 = trapee[trapname]; + if (v0 and !v) { + // this will make sure the value is set, + // and round the value from the text field + trapee.KeyPressed = "enter"; + } } cascade = v; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn