Fix event listeners that shouldn't be passive
parent
98ad645e6c
commit
69a08efae8
|
@ -6,7 +6,7 @@ import { AutoplayDelay } from './autoplay';
|
|||
import { boolSetting, BoolSetting } from './boolSetting';
|
||||
import AnalyseCtrl from './ctrl';
|
||||
import { cont as contRoute } from 'game/router';
|
||||
import { bind, dataIcon } from './util';
|
||||
import { bind, bindNonPassive, dataIcon } from './util';
|
||||
import * as pgnExport from './pgnExport';
|
||||
|
||||
interface AutoplaySpeed {
|
||||
|
@ -45,7 +45,7 @@ function deleteButton(ctrl: AnalyseCtrl, userId?: string): VNode | undefined {
|
|||
method: 'post',
|
||||
action: '/' + g.id + '/delete',
|
||||
},
|
||||
hook: bind('submit', _ => confirm(ctrl.trans.noarg('deleteThisImportedGame'))),
|
||||
hook: bindNonPassive('submit', _ => confirm(ctrl.trans.noarg('deleteThisImportedGame'))),
|
||||
},
|
||||
[
|
||||
h(
|
||||
|
|
|
@ -2,7 +2,7 @@ import { h, VNode } from 'snabbdom';
|
|||
import { ForecastCtrl, ForecastStep } from './interfaces';
|
||||
import AnalyseCtrl from '../ctrl';
|
||||
import { renderNodesHtml } from '../pgnExport';
|
||||
import { bind, dataIcon, spinner } from '../util';
|
||||
import { bind, dataIcon, spinner, bindNonPassive } from '../util';
|
||||
import { fixCrazySan } from 'chess';
|
||||
|
||||
function onMyTurn(ctrl: AnalyseCtrl, fctrl: ForecastCtrl, cNodes: ForecastStep[]): VNode | undefined {
|
||||
|
@ -67,7 +67,7 @@ export default function (ctrl: AnalyseCtrl, fctrl: ForecastCtrl): VNode {
|
|||
h(
|
||||
'a.del',
|
||||
{
|
||||
hook: bind(
|
||||
hook: bindNonPassive(
|
||||
'click',
|
||||
e => {
|
||||
fctrl.removeIndex(i);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { h, VNode } from 'snabbdom';
|
||||
import { snabModal } from 'common/modal';
|
||||
import { prop, Prop } from 'common';
|
||||
import { bind, bindSubmit, emptyRedButton } from '../util';
|
||||
import { bindNonPassive, bindSubmit, emptyRedButton } from '../util';
|
||||
import { StudyData } from './interfaces';
|
||||
import { Redraw, MaybeVNodes } from '../interfaces';
|
||||
import RelayCtrl from './relay/relayCtrl';
|
||||
|
@ -278,7 +278,7 @@ export function view(ctrl: StudyFormCtrl): VNode {
|
|||
action: '/study/' + data.id + '/clear-chat',
|
||||
method: 'post',
|
||||
},
|
||||
hook: bind('submit', _ => {
|
||||
hook: bindNonPassive('submit', _ => {
|
||||
return confirm(ctrl.trans.noarg('deleteTheStudyChatHistory'));
|
||||
}),
|
||||
},
|
||||
|
@ -291,7 +291,7 @@ export function view(ctrl: StudyFormCtrl): VNode {
|
|||
action: '/study/' + data.id + '/delete',
|
||||
method: 'post',
|
||||
},
|
||||
hook: bind('submit', _ => {
|
||||
hook: bindNonPassive('submit', _ => {
|
||||
return isNew || confirm(ctrl.trans.noarg('deleteTheEntireStudy'));
|
||||
}),
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { h, VNode, Attrs } from 'snabbdom';
|
||||
import { fixCrazySan } from 'chess';
|
||||
|
||||
export { bind, onInsert, bindSubmit } from 'common/snabbdom';
|
||||
export { bind, onInsert, bindNonPassive, bindSubmit } from 'common/snabbdom';
|
||||
|
||||
export { autolink, innerHTML, enrichText, richHTML, toYouTubeEmbed, toTwitchEmbed } from 'common/richText';
|
||||
|
||||
|
|
Loading…
Reference in New Issue