Browser compatibility fixes

This commit is contained in:
Ampflower 2023-10-09 22:42:21 -05:00
parent 4a9fd44811
commit 67235e6439
No known key found for this signature in database
GPG Key ID: EE6AE34FD60A0EAC
6 changed files with 12 additions and 8 deletions

View File

@ -1490,7 +1490,7 @@ Interface.definePanels(() => {
<div id="animation_controllers_wrapper"
:class="{connecting_controllers: connecting}"
:style="{zoom: zoom, '--blend-transition': controller && controller.last_state ? controller.last_state.blend_transition + 's' : 0}"
@click="deselect($event)" @mousewheel="onMouseWheel($event)"
@click="deselect($event)" @wheel="onMouseWheel($event)"
>
<div id="animation_controllers_pickwhip_anchor" style="height: 0px; position: relative;">

View File

@ -1162,7 +1162,7 @@ class BarSelect extends Widget {
if (typeof data.onChange === 'function') {
this.onChange = data.onChange
}
$(this.node).on('mousewheel', event => {
$(this.node).on('wheel', event => {
scope.trigger(event.originalEvent);
})
}

View File

@ -527,7 +527,7 @@ function setupInterface() {
}
//Scrolling
$('input[type="range"]').on('mousewheel', function () {
$('input[type="range"]').on('wheel', function () {
var obj = $(event.target)
var factor = event.deltaY > 0 ? -1 : 1
var val = parseFloat(obj.val()) + parseFloat(obj.attr('step')) * factor

View File

@ -216,7 +216,7 @@ class Keybind {
document.removeEventListener('keyup', onActivate)
document.removeEventListener('keydown', onActivateDown)
overlay.off('mousedown', onActivate)
overlay.off('mousewheel', onActivate)
overlay.off('wheel', onActivate)
overlay.off('keydown keypress keyup click click dblclick mouseup mousewheel', preventDefault)
if (event instanceof KeyboardEvent == false && event.target && event.target.tagName === 'BUTTON') return;
@ -247,7 +247,7 @@ class Keybind {
document.addEventListener('keyup', onActivate)
document.addEventListener('keydown', onActivateDown)
overlay.on('mousedown', onActivate)
overlay.on('mousewheel', onActivate)
overlay.on('wheel', onActivate)
overlay.on('keydown keypress keyup click click dblclick mouseup mousewheel', preventDefault)
return this;
@ -859,6 +859,10 @@ $(document).keyup(function(e) {
if (Pressing.alt && ActionControl.open) {
ActionControl.vue.$forceUpdate()
}
// Firefox-specific fix for suppressing the menu bar
if(e.which == 18) {
e.preventDefault();
}
if (e.which === 18 && Toolbox.original && Toolbox.original.alt_tool) {
Toolbox.original.select()
delete Toolbox.original;

View File

@ -285,7 +285,7 @@ Interface.definePanels(() => {
</div>
</div>
<div v-show="open_tab == 'picker' || open_tab == 'both'" @mousewheel="onMouseWheel($event)">
<div v-show="open_tab == 'picker' || open_tab == 'both'" @wheel="onMouseWheel($event)">
<div v-show="picker_type == 'box'" ref="square_picker" :style="{maxWidth: width + 'px'}">
<input id="main_colorpicker">
</div>
@ -389,7 +389,7 @@ Interface.definePanels(() => {
}))
}
$('#color_history').on('mousewheel', function(e) {
$('#color_history').on('wheel', function(e) {
var delta = (e.originalEvent.deltaY < 0 ? -90 : 90);
this.scrollLeft += delta;
})

View File

@ -3396,7 +3396,7 @@ Interface.definePanels(function() {
@contextmenu="contextMenu($event)"
@mousedown="onMouseDown($event)"
@touchstart="onMouseDown($event)"
@mousewheel="onMouseWheel($event)"
@wheel="onMouseWheel($event)"
class="checkerboard_target"
ref="viewport"
v-if="!hidden && mode !== 'face_properties'"