From cdd82fee5a16bbee5d0dc674af87fe8bb10a7709 Mon Sep 17 00:00:00 2001 From: johnshaughnessy <johnfshaughnessy@gmail.com> Date: Tue, 13 Nov 2018 16:23:51 -0800 Subject: [PATCH] Fix buttons by using `stopPropogation` but not `preventDefault` --- src/components/stop-event-propagation.js | 1 - src/hub.html | 2 +- src/systems/userinput/bindings/oculus-touch-user.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/stop-event-propagation.js b/src/components/stop-event-propagation.js index b12be3fa9..a4ed7a311 100644 --- a/src/components/stop-event-propagation.js +++ b/src/components/stop-event-propagation.js @@ -1,6 +1,5 @@ const handler = e => { e.stopPropagation(); - e.preventDefault(); }; AFRAME.registerComponent("stop-event-propagation", { diff --git a/src/hub.html b/src/hub.html index d8a95dee9..4e71703ce 100644 --- a/src/hub.html +++ b/src/hub.html @@ -191,7 +191,7 @@ > <a-entity class="ui interactable-ui" stop-event-propagation__grab-start="event: grab-start" stop-event-propagation__grab-end="event: grab-end"> <a-entity class="freeze-menu" visible-while-frozen="withinDistance: 10;"> - <a-entity mixin="rounded-text-action-button" pin-networked-object-button="labelSelector:.pin-button-label; hideWhenPinnedSelector:.hide-when-pinned; uiSelector:.interactable-ui" position="0 0.125 0.01"> </a-entity> + <a-entity mixin="rounded-text-action-button" pin-networked-object-button="labelSelector:.pin-button-label; hideWhenPinnedSelector:.hide-when-pinned;" position="0 0.125 0.01"> </a-entity> <a-entity class="pin-button-label" text=" value:pin; width:1.75; align:center;" text-raycast-hack position="0 0.125 0.02"></a-entity> <a-entity mixin="rounded-text-button" class="hide-when-pinned" remove-networked-object-button position="0 -0.125 0.01"> </a-entity> <a-entity text=" value:remove; width:1.75; align:center;" class="hide-when-pinned" text-raycast-hack position="0 -0.125 0.02"></a-entity> diff --git a/src/systems/userinput/bindings/oculus-touch-user.js b/src/systems/userinput/bindings/oculus-touch-user.js index b2dd95664..9fb929fbc 100644 --- a/src/systems/userinput/bindings/oculus-touch-user.js +++ b/src/systems/userinput/bindings/oculus-touch-user.js @@ -492,7 +492,7 @@ export const oculusTouchUserBindings = addSetsToBindings({ { src: { value: rightTriggerPressed2 }, dest: { value: paths.actions.cursor.grab }, - xform: xforms.falling, + xform: xforms.rising, priority: 2 } ], -- GitLab