Revision: 4850
http://sourceforge.net/p/vexi/code/4850
Author: mkpg2
Date: 2016-03-22 18:50:08 +0000 (Tue, 22 Mar 2016)
Log Message:
-----------
Fix. Possible to paste into a text field and never have it receive focus. Text
area fields rely on the focus to put to the value property (when focus is later
lost), so data models can stay upto date. Should probably receive focus anyway.
Modified Paths:
--------------
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
Modified:
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
2016-03-16 21:47:10 UTC (rev 4849)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/default.t
2016-03-22 18:50:08 UTC (rev 4850)
@@ -47,6 +47,7 @@
thisbox.v_cursor = $cursor;
thisbox.v_edit = $edit;
thisbox.v_edit.cursor = "text";
+ thisbox.v_edit.v_field = thisbox;
/** syncCursor function called by edit.t */
$edit.syncCursor = function(v) {
Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
2016-03-16 21:47:10 UTC (rev 4849)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
2016-03-22 18:50:08 UTC (rev 4850)
@@ -881,7 +881,7 @@
} else {
// prepare vars for thread and initiate
aBlock = mBlock;
- aWord = mBlock.mWord;
+ aWord = mBlock?.mWord;
aInWord = true == mBlock?.mWord?.mouse?.inside;
aX = m.x-frameToThis.x;
aY = m.y-frameToThis.y;
@@ -1790,8 +1790,9 @@
cBlock.reflowbox = true;
syncCursorAndOffset(true);
if(v_field){ // this check may not be necessary
- v_field.text = text;
- }
+ v_field.focused = true;
+ }
+ focused = true;
}
}
@@ -1801,8 +1802,9 @@
deleteSelectedText();
syncCursorAndOffset(true);
if(v_field){ // this check may not be necessary
- v_field.text = text;
+ v_field.focused = true;
}
+ focused = true;
}
thisbox.paste = function() {
@@ -1812,9 +1814,11 @@
var t = vexi.ui.clipboard;
insertText(t);
syncCursorAndOffset(true);
+ trace(v_field);
if(v_field){ // this check may not be necessary
- v_field.text = text;
- }
+ v_field.focused = true;
+ }
+ focused = true;
}
// functions for read only theme access to c* variabels
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn