Browse Source

fix: stop event propagation

Ahmad Kholid 3 years ago
parent
commit
53932c9a34

+ 1 - 1
src/components/newtab/workflow/edit/EditBlockSettings.vue

@@ -66,7 +66,7 @@ const emit = defineEmits(['change']);
 const { t } = useI18n();
 const { t } = useI18n();
 
 
 const browserType = BROWSER_TYPE;
 const browserType = BROWSER_TYPE;
-const supportedBlocks = ['forms', 'event-click', 'trigger-event'];
+const supportedBlocks = ['forms', 'event-click', 'trigger-event', 'press-key'];
 const tabs = [
 const tabs = [
   { id: 'on-error', name: t('workflow.blocks.base.onError.button') },
   { id: 'on-error', name: t('workflow.blocks.base.onError.button') },
   { id: 'lines', name: t('workflow.blocks.base.settings.line.title') },
   { id: 'lines', name: t('workflow.blocks.base.settings.line.title') },

+ 5 - 2
src/content/elementSelector/App.vue

@@ -36,11 +36,14 @@
         <div class="flex-grow"></div>
         <div class="flex-grow"></div>
         <button
         <button
           class="mr-2 hoverable p-1 rounded-md transition"
           class="mr-2 hoverable p-1 rounded-md transition"
-          @click="state.hide = !state.hide"
+          @click.stop="state.hide = !state.hide"
         >
         >
           <v-remixicon :name="state.hide ? 'riEyeOffLine' : 'riEyeLine'" />
           <v-remixicon :name="state.hide ? 'riEyeOffLine' : 'riEyeLine'" />
         </button>
         </button>
-        <button class="hoverable p-1 rounded-md transition" @click="destroy">
+        <button
+          class="hoverable p-1 rounded-md transition"
+          @click.stop="destroy"
+        >
           <v-remixicon name="riCloseLine" />
           <v-remixicon name="riCloseLine" />
         </button>
         </button>
       </div>
       </div>