File tree Expand file tree Collapse file tree 6 files changed +19
-8
lines changed
Expand file tree Collapse file tree 6 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,17 @@ import tseslint from "typescript-eslint";
1616
1717// Good reference: https://github.com/dustinspecker/awesome-eslint#readme
1818
19- const CLIENT_ONLY_FILES = "src/**/*.{js,ts}" ;
20- const TEST_ONLY_FILES = "src/**/__tests__/**" ;
21- const STORYBOOK_FILES = ".storybook/**/*.{js,ts}" ;
19+ const CLIENT_ONLY_FILES = "./ src/**/*.{js,ts}" ;
20+ const TEST_ONLY_FILES = "./ src/**/__tests__/**" ;
21+ const STORYBOOK_FILES = "./. storybook/**/*.{js,ts}" ;
2222
2323const ALL_FILES = [
2424 CLIENT_ONLY_FILES ,
2525 STORYBOOK_FILES ,
2626 // Root level files
27- "*.{js,ts}" ,
27+ "./ *.{js,ts}" ,
2828 // Scripts
29- "etc/**/*.{js,ts}" ,
29+ "./ etc/**/*.{js,ts}" ,
3030] ;
3131
3232/*
Original file line number Diff line number Diff line change 4949 "lint:fix" : " eslint --color --fix ." ,
5050 "lint:inspect" : " eslint --inspect-config" ,
5151 "prettier" : " prettier --check ./etc ./src ./.storybook ./*.ts ./*.js" ,
52- "prettier:fix" : " prettier --write ./etc ./src ./.storybook ./*.ts" ,
52+ "prettier:fix" : " prettier --write ./etc ./src ./.storybook ./*.ts ./*.js " ,
5353 "release" : " release-it --only-version --config ./etc/release-it.ts" ,
5454 "storybook" : " cross-env BROWSER=chromium storybook dev -p 8443 --https --ssl-cert ./etc/ssl-certs/localhost.crt --ssl-key ./etc/ssl-certs/localhost.key" ,
5555 "test" : " cross-env ENVIRON=test vitest --watch=false" ,
Original file line number Diff line number Diff line change @@ -161,6 +161,12 @@ const options: VideomailClientOptions = {
161161 // when true, any errors will be sent to the videomail server for analysis
162162 reportErrors : true ,
163163
164+ // This is because we need to set this to false by default for our WordPress plugin unfortunately.
165+ // Because WordPress plugins do overlap with each other.
166+ //
167+ // We will keep the default to `true` but offer an option to correct it on WP side.
168+ disableFormWhenSubmitting : true ,
169+
164170 // just for testing purposes to simulate browser agent handling
165171 fakeUaString : undefined ,
166172
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ export interface VideomailClientOptions {
132132 displayErrors : boolean ;
133133 adjustFormOnBrowserError : boolean ;
134134 reportErrors : boolean ;
135+ disableFormWhenSubmitting ?: boolean | undefined ;
135136 fakeUaString ?: string | undefined ;
136137
137138 versions ?: {
Original file line number Diff line number Diff line change @@ -751,7 +751,11 @@ class Container extends Despot {
751751 this . options . logger . debug ( `Container: submitAll(${ output } )` ) ;
752752
753753 this . beginWaiting ( ) ;
754- this . disableForm ( true ) ;
754+
755+ if ( this . options . disableFormWhenSubmitting ) {
756+ this . disableForm ( true ) ;
757+ }
758+
755759 this . emit ( "SUBMITTING" ) ;
756760
757761 if ( ! hasVideomailKey ) {
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ class Visuals extends Despot {
204204 }
205205
206206 public removeChild ( child : HTMLElement ) {
207- this . visualsElement ?. removeChild ( child ) ;
207+ child . remove ( ) ;
208208 }
209209
210210 public reset ( ) {
You can’t perform that action at this time.
0 commit comments