mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	eslint: Fix unicorn/prefer-dom-node-dataset.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							392676d4da
						
					
				
				
					commit
					44f9aaec32
				
			@@ -562,7 +562,7 @@ export function drafts_handle_events(e, event_key) {
 | 
			
		||||
    // This handles when pressing Enter while looking at drafts.
 | 
			
		||||
    // It restores draft that is focused.
 | 
			
		||||
    if (event_key === "enter") {
 | 
			
		||||
        if (document.activeElement.parentElement.hasAttribute("data-draft-id")) {
 | 
			
		||||
        if (Object.hasOwn(document.activeElement.parentElement.dataset, "draftId")) {
 | 
			
		||||
            restore_draft(focused_draft_id);
 | 
			
		||||
        } else {
 | 
			
		||||
            const first_draft = draft_id_arrow.at(-1);
 | 
			
		||||
 
 | 
			
		||||
@@ -241,7 +241,7 @@ export class LightboxCanvas {
 | 
			
		||||
        this.context = this.canvas.getContext("2d");
 | 
			
		||||
 | 
			
		||||
        this.meta.image = new Image();
 | 
			
		||||
        this.meta.image.src = this.canvas.getAttribute("data-src");
 | 
			
		||||
        this.meta.image.src = this.canvas.dataset.src;
 | 
			
		||||
        this.meta.image.addEventListener("load", () => {
 | 
			
		||||
            this.meta.ratio = funcs.imageRatio(this.meta.image);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1235,7 +1235,7 @@ export function register_click_handlers() {
 | 
			
		||||
    clipboard_enable(".copy_link").on("success", (e) => {
 | 
			
		||||
        hide_actions_popover();
 | 
			
		||||
        // e.trigger returns the DOM element triggering the copy action
 | 
			
		||||
        const message_id = e.trigger.getAttribute("data-message-id");
 | 
			
		||||
        const message_id = e.trigger.dataset.messageId;
 | 
			
		||||
        const row = $(`[zid='${CSS.escape(message_id)}']`);
 | 
			
		||||
        row.find(".alert-msg")
 | 
			
		||||
            .text($t({defaultMessage: "Copied!"}))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user