Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

[Bug] disabled property should apply after style appended #6131

Open
Aqours opened this issue Nov 5, 2017 · 1 comment
Open

[Bug] disabled property should apply after style appended #6131

Aqours opened this issue Nov 5, 2017 · 1 comment

Comments

@Aqours
Copy link

Aqours commented Nov 5, 2017

disabled property should apply after style appended.

prefixfree/prefixfree.js

Lines 77 to 83 in 0d3d2a0

style.disabled = link.disabled;
style.setAttribute('data-href', link.getAttribute('href'));
if(link.id) style.id = link.id;
parent.insertBefore(style, link);
parent.removeChild(link);

Fixed code:

 // style.disabled = link.disabled;
 style.setAttribute('data-href', link.getAttribute('href')); 
  
 if(link.id) style.id = link.id; 
  
 parent.insertBefore(style, link); 
 style.disabled = link.disabled; // after style appended, otherwise disabled is always false.
 parent.removeChild(link); 
@jljr222
Copy link

jljr222 commented Jun 19, 2019

Thank you for this fix, helped me with a project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants