Przeglądaj źródła

Fix section edit trigger

Vijayakrishnan Krishnan 4 lat temu
rodzic
commit
014bb2c77d

+ 5 - 2
resources/views/app/patient/note/dashboard.blade.php

@@ -239,9 +239,10 @@
                         @foreach($note->sections as $section)
                         <div class="p-3 border-bottom note-section">
                             <div class="d-flex align-items-start">
-                                <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer edit-trigger">
+                                <a class="font-weight-bold mb-2 d-flex align-items-center c-pointer">
                                     {{$section->sectionTemplate->title}}
                                     <span class="d-none if-not-edit"><i class="fa fa-edit ml-2"></i></span>
+                                    <span class="edit-trigger"></span>
                                 </a>
                                 <?php $sectionInternalName = $section->sectionTemplate->internal_name; ?>
                                 @include('app/patient/note/_templates-index')
@@ -591,7 +592,9 @@
 
                 $(document)
                     .off('mousedown.enable-edit', '.note-section:not(.edit)')
-                    .on('mousedown.enable-edit', '.note-section:not(.edit)', function() {
+                    .on('mousedown.enable-edit', '.note-section:not(.edit)', function(e) {
+                        e.stopPropagation();
+                        e.preventDefault();
                         $(this).find('.edit-trigger').first().click();
                         return false;
                     });