Skip to content

Geotab Drive dom conflict #28

@stechnique

Description

@stechnique

In the new generator-addin, instead of creating a root element with the add-in name, it creates a root element with an id of 'app'. It automatically adds code like elAddin = document.getElementById('app').
This works fine in MyGeotab, but when creating a Geotab Drive add-in, the Drive app already uses an 'app' id which is above our add-in in the DOM tree, and it produces this structure :

  <div id='app'>
    <div role='navigation' id='topbar-container'>...</div>
    <div role='main' id='main'>
      <div id='scroll-content'>
        <section id='content' class='addin-content'>
          <div id='app'>
              ... ADD-IN CONTENT HERE ...
          </div>
        </section>
      </div>
    </div>
    ...
  </div>

This is a problem in and of itself to have 2 identical IDs in the DOM, and gets worse because on blur the scaffolded code hides elAddin, which hides the entire Drive app UI instead of just our add-in content.
Is there a reason why the new generator uses id='app' instead of relying on the root add-in element like previous versions did? Is it supported for us to change this main element ID in our Drive add-ins, or are you relying on it being identified 'app'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions