Skip to content

Commit c140227

Browse files
authored
Switch transcription input to readonly (#495)
Replace the .transcription-input[disabled] selector with .transcription-input:read-only and add cursor: default to its styles. Update the input template to set readonly (instead of disabled) when edit permissions are not present, preserving the existing permission checks.
1 parent 7b3982c commit c140227

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

components/transcription-block/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,9 +596,10 @@ export default class TranscriptionBlock extends HTMLElement {
596596
transition: border-color 0.2s ease;
597597
}
598598
599-
.transcription-input[disabled] {
599+
.transcription-input:read-only {
600600
border-color: transparent;
601601
color: #777;
602+
cursor: default;
602603
}
603604
604605
.transcription-input:focus {
@@ -645,7 +646,7 @@ export default class TranscriptionBlock extends HTMLElement {
645646
<div class="flex-center">
646647
<button class="prev-page-button hidden">Previous Page</button>
647648
<button class="prev-button">Prev</button>
648-
<input type="text" class="transcription-input" placeholder="Transcription input text" value="" ${CheckPermissions.checkEditAccess('LINE', 'TEXT') || CheckPermissions.checkEditAccess('LINE', 'CONTENT') ? '' : 'disabled'}>
649+
<input type="text" class="transcription-input" placeholder="Transcription input text" value="" ${CheckPermissions.checkEditAccess('LINE', 'TEXT') || CheckPermissions.checkEditAccess('LINE', 'CONTENT') ? '' : 'readonly'}>
649650
<button class="next-button">Next</button>
650651
<button class="next-page-button hidden">Next Page</button>
651652
</div>

0 commit comments

Comments
 (0)