1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

17 commits

Author SHA1 Message Date
Yoshiyuki Hirano
948c2c48df Use ssl in guide and comment [ci skip] 2017-08-19 08:23:37 +09:00
yuuji.yaginuma
05bbfc5eab Fix test directory to correct path
Together, fix to the following lint violation.

```
rails/actionview/test/ujs/public/test/data-confirm.js
  303:11  error  Strings must use singlequote  quotes

rails/actionview/test/ujs/public/test/data-remote.js
  414:32  error  Extra semicolon  semi

✖ 2 problems (2 errors, 0 warnings)
```
2017-07-30 16:28:10 +09:00
Kir Shatrov
424117281e Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
Marc Rendl Ignacio
0093ce16b3 Add jQuery to test vendor files
... so that we can run most, if not all, of rails-ujs
tests without necessarily requiring an internet connection.
2017-07-20 20:49:05 +08:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
".. with __dir__ we can restore order in the Universe." - by @fxn

Related to 5b8738c2df
2017-05-23 00:53:51 +03:00
Dmytro Vasin
db65f73f2e Fix mistake in JS response parser:
-
  Restore ability to accept ecmascript
  JS response should not modify DOM.
2017-04-13 16:58:36 +03:00
Dmytro Vasin
dc8ddea563 Set current page as default for ajax requests 2017-04-11 06:56:52 +03:00
Patrick Toomey
9ca712348e
Prevent event propogation if element is disabled when event chain begins.
The existing UJS event behavior relies on browsers not sending events for
various events when an element is disabled. For example, imagine the following:

    <button type="submit" disabled="disabled">Click me</button>

The above button is disabled, so browsers will not trigger a click event and
all UJS behavior is prevented. However, imagine a button like this:

    <button type="submit" disabled="disabled"><strong>Click me</strong></button>

The above is treated differently by browsers such as Chrome/Safari. These
browsers do not consider the strong tag to be disabled, and will trigger click
events. UJS has logic to walk up the DOM to find an associated element subject
to UJS behavior. But, this logic does not take into account the disabled
status of the element.

I originally thought we could simply change the selectors used to match
elements to ignore disabled elements. However, UJS disables some elements as
part of the event chain. So, an element might match early in the chain and
then fail to match later. Instead of changing the selectors I added a callback
to the chain that calls `stopEverything` if an element is disabled when the
event chain begins.
2017-03-09 23:06:18 -07:00
Rafael Mendonça França
fe4a5706ac
Test rails-ujs in our travis matrix 2017-02-22 13:49:28 -05:00
Guillermo Iguaran
41c33bd4b2 Import rails-ujs v0.1.0 from rails/rails-ujs 2017-02-20 14:29:55 +09:00
Benjamin Fleischer
c8b5d828e7 Correct spelling
```
go get -u github.com/client9/misspell/cmd/misspell
misspell  -w -error -source=text .
```
2017-02-05 19:00:18 -06:00
Akira Matsuda
650e46afbc s/an/a/
[ci skip]
2017-01-26 00:56:40 +09:00
Rafael Mendonça França
010e246756
Fix Rubocop violations and fix documentation visibility
Some methods were added to public API in
5b14129d8d and they should be not part of
the public API.
2016-12-28 21:53:51 -05:00
yuuji.yaginuma
d71f289fb2 stop using removed render :text
Follow up to 79a5ea9ead
2016-12-03 15:28:59 +09:00
Guillermo Iguaran
02568801e6 Add UJS tests 2016-11-26 01:23:07 -05:00