Skip to content

Commit 011afd4

Browse files
authored
chore(form-file): Minor update
1 parent 2b111a5 commit 011afd4

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

lib/components/form-file.vue

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@
1919
@dragover.stop.prevent="dragover">
2020
<!-- Normally this div should be label, but IE borks out if label has a file input inside. Awaiting fix from MSFT -->
2121

22-
<!-- Drop Here Target, set as label so it can be associated with input -->
23-
<label v-if="dragging"
24-
:for="safeId()"
25-
:data-drop="dropLabel"
26-
class="drop-here"
27-
@dragover.stop.prevent="dragover"
28-
@drop.stop.prevent="drop"
29-
@dragleave.stop.prevent="dragging=false"
30-
></label>
22+
<!-- Drop Here Target -->
23+
<span v-if="dragging"
24+
:data-drop="dropLabel"
25+
class="drop-here"
26+
@dragover.stop.prevent="dragover"
27+
@drop.stop.prevent="drop"
28+
@dragleave.stop.prevent="dragging=false"
29+
></span>
3130

3231
<!-- Real Form input -->
3332
<input type="file"
@@ -48,13 +47,11 @@
4847
@change="onFileChange">
4948

5049
<!-- Overlay Labels -->
51-
<!-- this is normally a <span> but we use <label> here so we can associate it with the input -->
52-
<label :id="safeId('_BV_file_control_')"
53-
:for="safeId()"
54-
:class="['custom-file-control', dragging?'dragging':null]"
55-
:data-choose="computedChooseLabel"
56-
:data-selected="selectedLabel"
57-
></label>
50+
<span :id="safeId('_BV_file_control_')"
51+
:class="['custom-file-control', dragging?'dragging':null]"
52+
:data-choose="computedChooseLabel"
53+
:data-selected="selectedLabel"
54+
></span>
5855

5956
</div>
6057
</template>

0 commit comments

Comments
 (0)