Skip to content

[Bug]: Tab in QGIS HTML maptip Popup are not active #6749

@Alain-LG

Description

@Alain-LG

What is the bug? (in English)

When you use the QGIS HTML maptip with the drag and drop form layout click, if you have several tabs in your form, just the first one is active.
When you click on one of the other tabs, the popup doesn't move and still shows the first tab data.

Steps to reproduce the issue

As i said in this conversation https://discourse.osgeo.org/t/attribute-view-in-lizmap-webclient/153488/19?u=alain-lg, i thought that this problem was due to my personnal CSS but it seems to be encountered by other people.

  • Insert several tabs in drag-and-drop form.
  • In lizmap plugin, use the option "QGIS HTML maptip"

This code is generated :

</div><ul class="nav nav-tabs">

  <li class="nav-item"><button class="nav-link active" data-bs-toggle="tab" data-bs-target="#popup_dd_[% $id %]_onglet_1">onglet 1</button></li>

  <li class="nav-item"><button class="nav-link " data-bs-toggle="tab" data-bs-target="#popup_dd_[% $id %]_onglet_2">onglet 2</button></li>

  <li class="nav-item"><button class="nav-link " data-bs-toggle="tab" data-bs-target="#popup_dd_[% $id %]_onglet_3">onglet 3</button></li>
</ul>
<div class="tab-content">
  <div id="popup_dd_[% $id %]_onglet_1" class="tab-pane active">

ans shows this popup :

Image

But, if you click on the second or third tab, it's allways the first one which is shown.

I can correct manually this bug by modyfing the HTML code and usind "a href" link instead of the "button" :

</div><ul class="nav nav-tabs">

  <li class="active"><a href="#popup_dd_[% $id %]_onglet_1" data-toggle="tab">onglet 1</a></li>

  <li class=""><a href="#popup_dd_[% $id %]_onglet_2" data-toggle="tab">onglet 2</a></li>

  <li class=""><a href="#popup_dd_[% $id %]_onglet_3" data-toggle="tab">onglet 3</a></li>
</ul>
<div class="tab-content">
  <div id="popup_dd_[% $id %]_onglet_1" class="tab-pane active">

You need to change the "data-bs-toggle" tag by "data-toggle" too.

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.9.7 - commit 800219e 800219e95
  • Lizmap plugin : 4.5.9
  • QGIS Desktop : 3.40.7
  • Lizmap.com : Yes
  • QGIS Server : 3.40.15
  • Py-QGIS-Server : 1.9.6
  • QGIS Server plugin atlasprint : 3.4.3
  • QGIS Server plugin cadastre : 2.2.5
  • QGIS Server plugin lizmap_server : 2.14.1
  • QGIS Server plugin wfsOutputExtension : 1.8.3
List of Lizmap Web Client modules :
* cadastre : 2.1.6 * saas : 1.8.1 * webdav : 1.2.1
List of safeguards :
* Mode : normal
* Allow parent folder : yes
* Number of parent : 2 folder(s)
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

Lizmap CLoud

Browsers

Firefox

Browsers version

149.0.2 (64 bits)

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions