Uncaught TypeError: Cannot read property 'mode' of undefined - Read-only Template field inside of a

When a table contains a drawer that contains a template field marked as read-only, the double-click event is being handled resulting in an “Uncaught TypeError: Cannot read property mode of undefined” exception.

Couple of notes:

  1. It appears that the dblclick handler is tracking any nx-field inside of the tbody which is leading to the exception since there is no outer tr in this particular situation.
  2. The exception appears to be benign and page functionality continues as expected but could lead to issue in the future if further processing were ever added to this code path.

Steps to reproduce:

  1. Create new page using XML below
  2. Preview page
  3. Expand drawer for any contact
  4. Double-click the value side of the template field

Actual Result:
Uncaught TypeError: Cannot read property ‘mode’ of undefined and processing halts

Expected Result:
No exception and double-click should not be handled in this situation since the field is not editable.

Sample XML

<skuidpage unsavedchangeswarning="yes" showsidebar="true" showheader="true" tabtooverride="Account">   <models>
      <model id="Contact" limit="" query="true" createrowifnonefound="false" sobject="Contact" doclone="" type="">
            <field id="Id"/>
            <field id="Name"/>
            <field id="FirstName"/>
      <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Contact" buttonposition="" mode="read">
            <field id="Name"/>
            <action type="drawer" label="View Details" icon="sk-icon-magic">
               <drawer title="Drawer Area" width="90%" closehandle="true">
                     <basicfieldeditor showheader="true" showsavecancel="false" model="Contact" buttonposition="" mode="read" layout="">
                           <column width="100%">
                                 <section title="Section A" collapsible="no">
                                       <field type="COMBO" valuehalign="" editmodebehavior="autopopup" allowhtml="false" readonly="true">
                                          <label>Template Field</label>
                           <condition type="contextrow" field="Id" mergefield="Id"/>
         <massactions usefirstitemasdefault="true"/>
            <view type="standard"/>

Thanks for the detail.  We will review.