mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 08:06:51 +02:00
fix: restrict contextmenu preventDefault to the checkbox only
This commit is contained in:
@@ -43,9 +43,6 @@ define('topicSelect', ['components'], function (components) {
|
|||||||
// Long press
|
// Long press
|
||||||
let longPressTimeout;
|
let longPressTimeout;
|
||||||
const start = function (ev) {
|
const start = function (ev) {
|
||||||
if (ev.type === 'touchstart') {
|
|
||||||
ev.preventDefault();
|
|
||||||
}
|
|
||||||
isLongPress = false;
|
isLongPress = false;
|
||||||
longPressTimeout = setTimeout(() => {
|
longPressTimeout = setTimeout(() => {
|
||||||
isLongPress = true;
|
isLongPress = true;
|
||||||
@@ -68,7 +65,7 @@ define('topicSelect', ['components'], function (components) {
|
|||||||
topicsContainer.on('mouseleave', '[component="topic/select"]', cancel);
|
topicsContainer.on('mouseleave', '[component="topic/select"]', cancel);
|
||||||
topicsContainer.on('touchend', '[component="topic/select"]', cancel);
|
topicsContainer.on('touchend', '[component="topic/select"]', cancel);
|
||||||
topicsContainer.on('touchcancel', '[component="topic/select"]', cancel);
|
topicsContainer.on('touchcancel', '[component="topic/select"]', cancel);
|
||||||
topicsContainer.on('contextmenu', (e) => {
|
topicsContainer.on('contextmenu', '[component="topic/select"]', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user