Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove javascript:void links #189

Closed
atodorov opened this issue Jan 19, 2018 · 2 comments
Closed

Remove javascript:void links #189

atodorov opened this issue Jan 19, 2018 · 2 comments

Comments

@atodorov
Copy link
Member

As stated in:
https://stackoverflow.com/questions/1291942/what-does-javascriptvoid0-mean/1293130#1293130

this is now a very old approach and not really necessary. It needs to go.

Notes:

  1. There are 45 such links at present
  2. Replace with # or #id_of_element (where applicable)
  3. In case there's onClick event for this element (almost always is) it needs to return false as stated in the SO answer.

Send PRs for this in small groups and work on 1 template at a time.

@atodorov
Copy link
Member Author

atodorov commented Jan 6, 2020

Down to 15 ATM. Migration to Patternfly helps resolve these issues. Also related #241.

@atodorov atodorov added this to the patternfly-migration milestone Jan 17, 2020
atodorov added a commit that referenced this issue Jan 21, 2020
atodorov added a commit that referenced this issue Jan 28, 2020
atodorov added a commit that referenced this issue Feb 5, 2020
atodorov added a commit that referenced this issue Feb 6, 2020
atodorov added a commit that referenced this issue Feb 7, 2020
@linehammer
Copy link

Why use void(0) in JavaScript?

The void operator evaluates the given expression and then returns undefined. If you have pass 0 as the unary expression operand to the void operator, JavaScript coerces 0 to "false" and returns, but void doesn't care and simply returns undefined, which means "do nothing" . Put them together and you have composed a way to programmatically "do nothing" when a link is clicked. JavaScript Void(0) is often used when, inserting an expression into a web page may produce an unwanted side-effect.

atodorov added a commit that referenced this issue Feb 10, 2020
atodorov added a commit that referenced this issue Nov 8, 2020
there are no-more legacy run/ templates and the only one left
is merges inside its parent.

Closes #189 because there are no more `javascript:void` references
left in the code base.

Closes #241 because there are no more legacy buttons.
atodorov added a commit that referenced this issue Nov 9, 2020
there are no-more legacy run/ templates and the only one left
is merges inside its parent.

Closes #189 because there are no more `javascript:void` references
left in the code base.

Closes #241 because there are no more legacy buttons.
atodorov added a commit that referenced this issue Nov 20, 2020
there are no-more legacy run/ templates and the only one left
is merges inside its parent.

Closes #189 because there are no more `javascript:void` references
left in the code base.

Closes #241 because there are no more legacy buttons.
atodorov added a commit that referenced this issue Dec 1, 2020
there are no-more legacy run/ templates and the only one left
is merges inside its parent.

Closes #189 because there are no more `javascript:void` references
left in the code base.

Closes #241 because there are no more legacy buttons.
asankov pushed a commit to asankov/Kiwi that referenced this issue Dec 2, 2020
there are no-more legacy run/ templates and the only one left
is merges inside its parent.

Closes kiwitcms#189 because there are no more `javascript:void` references
left in the code base.

Closes kiwitcms#241 because there are no more legacy buttons.
asankov pushed a commit to asankov/Kiwi that referenced this issue Dec 2, 2020
there are no-more legacy run/ templates and the only one left
is merges inside its parent.

Closes kiwitcms#189 because there are no more `javascript:void` references
left in the code base.

Closes kiwitcms#241 because there are no more legacy buttons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants