From bd0a372067126bf29d1251786c449f9310805cfc Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 22 Apr 2010 12:27:14 -0600 Subject: [PATCH] Need a more unique DOM ID --- imp/js/ViewPort.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/imp/js/ViewPort.js b/imp/js/ViewPort.js index cc49a9e31..180075565 100644 --- a/imp/js/ViewPort.js +++ b/imp/js/ViewPort.js @@ -1546,7 +1546,7 @@ ViewPort_Buffer = Class.create({ if (!Object.isUndefined(e)) { // We can directly write the rownum to the original object // since we will always rewrite when creating rows. - e.VP_domid = 'VP_row' + u; + e.VP_domid = 'VProw' + this.view + '_' + u; e.VP_rownum = this.uidlist.get(u); e.VP_id = u; return e; @@ -1709,10 +1709,11 @@ ViewPort_Selection = Class.create({ case 'div': // ID here is the DOM ID of the element object. - return d.pluck('id').invoke('substring', 6); + d = d.pluck('id'); + // Fall-through case 'domid': - return d.invoke('substring', 6); + return d.invoke('substring', 6 + this.buffer.getView().length); case 'rownum': return this.buffer.rowsToUIDs(d); -- 2.11.0