File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,10 @@ const processDirective = (
121
121
let modifiers : Record < string , true > | undefined
122
122
123
123
// modifiers
124
- let modMatch : RegExpExecArray | null = null
125
- while ( ( modMatch = modifierRE . exec ( raw ) ) ) {
126
- ; ( modifiers || ( modifiers = { } ) ) [ modMatch [ 1 ] ] = true
127
- raw = raw . slice ( 0 , modMatch . index )
128
- }
124
+ raw = raw . replace ( modifierRE , ( _ , m ) => {
125
+ ; ( modifiers || ( modifiers = { } ) ) [ m ] = true
126
+ return ''
127
+ } )
129
128
130
129
if ( raw [ 0 ] === ':' ) {
131
130
dir = bind
Original file line number Diff line number Diff line change 11
11
placeholder ="type x to test key modifier "
12
12
/>
13
13
< form >
14
- < button type ="submit " @click.prevent > submit (prevented)</ button >
14
+ < button type ="submit " @click.prevent.stop > submit (prevented)</ button >
15
15
</ form >
16
16
< button @click.right ="alert('clicked') "> right click</ button >
17
17
< button @click.middle ="alert('clicked') "> middle click</ button >
You can’t perform that action at this time.
0 commit comments