diff --git a/components/script/dom/document_event_handler.rs b/components/script/dom/document_event_handler.rs index db743309ef3..d6bcffbfe94 100644 --- a/components/script/dom/document_event_handler.rs +++ b/components/script/dom/document_event_handler.rs @@ -589,8 +589,7 @@ impl DocumentEventHandler { // Step 9. If mbutton is the secondary mouse button, then // Maybe show context menu with native, target. - if let (MouseButtonAction::Down, MouseButton::Right) = (event.action, event.button) - { + if let MouseButton::Right = event.button { self.maybe_show_context_menu( node.upcast(), &hit_test_result, @@ -611,12 +610,6 @@ impl DocumentEventHandler { dom_event.dispatch(node.upcast(), false, can_gc); }, } - - // When the contextmenu event is triggered by right mouse button - // the contextmenu event MUST be dispatched after the mousedown event. - if let (MouseButtonAction::Down, MouseButton::Right) = (event.action, event.button) { - self.maybe_show_context_menu(node.upcast(), &hit_test_result, input_event, can_gc); - } } ///